Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Possible ztrdup memory leaks?



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@xxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author