Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Possible ztrdup memory leaks?
- X-seq: zsh-workers 18265
- From: "John T. Guthrie" <guthrie@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Possible ztrdup memory leaks?
- Date: Thu, 20 Feb 2003 03:31:22 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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