zsh-workers
 help / color / mirror / code / Atom feed
* Possible ztrdup memory leaks?
@ 2003-02-20  8:31 John T. Guthrie
  2003-02-20 10:45 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: John T. Guthrie @ 2003-02-20  8:31 UTC (permalink / raw)
  To: zsh-workers


While going through the code in exec.c, I found the following at line 2876:

    nam = ztrdup(nam);

Correct me if I'm wrong, but would this cause a memory leak?  I found two other
places in the code where you have something of the form foo=ztrdup(foo): at
line 3408 of exec.c and line 330 of init.c.  Since ztrdup() uses zalloc(), I
wasn't certain if something special needed to be done to fix these leaks.
(The first and third of these potential leaks look intuitively easy to fix, but
I'm not certain if the second one is really a leak or not.)

John Guthrie
guthrie@counterexample.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-21 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20  8:31 Possible ztrdup memory leaks? John T. Guthrie
2003-02-20 10:45 ` Peter Stephenson
2003-02-20 12:57   ` John T. Guthrie
2003-02-21 10:18     ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).