[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Memory leak in lutil_log_int() (ITS#2538)
Full_Name: Hallvard B. Furuseth
Version: HEAD
OS:
URL:
Submission from: (NULL) (129.240.186.42)
liblber/debug.c:lutil_log_int() does
t_subsys = strdup(subsys);
but never frees t_subsys.
However, this code is broken anyway. First, it strdup()s the value even
in cases it is not needed (when the function return;s without using it).
Second, why strdup it at all? I suggest you print the subsystem in its
original case, or uppercase it in lutil_subsys[], or uppercase it in
a lutil_subsys_uppercase[] array which contains an uppercased copy of
lutil_subsys[].