Document xundump() memory leak more clearly
This commit is contained in:
parent
a5c2a24db6
commit
25115f4997
1 changed files with 1 additions and 0 deletions
|
@ -615,6 +615,7 @@ setstr(int fldno, char *str)
|
||||||
case NSC_STRING:
|
case NSC_STRING:
|
||||||
old = ((char **)memb_ptr)[idx];
|
old = ((char **)memb_ptr)[idx];
|
||||||
if (!must_match)
|
if (!must_match)
|
||||||
|
/* FIXME may leak old value */
|
||||||
((char **)memb_ptr)[idx] = str ? strdup(str) : NULL;
|
((char **)memb_ptr)[idx] = str ? strdup(str) : NULL;
|
||||||
len = 65535; /* really SIZE_MAX, but that's C99 */
|
len = 65535; /* really SIZE_MAX, but that's C99 */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue