Skip to content

Commit

Permalink
libsnmp: free filenames from directory listing
Browse files Browse the repository at this point in the history
Free each filename as we use it, as well as freeing the
list of filenames.

Fixes: 2b3e300 ("CHANGES: libsnmp: Scan MIB directories in alphabetical order")
  • Loading branch information
fenner committed Jun 4, 2019
1 parent 5280e83 commit 2968b45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions snmplib/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -5037,6 +5037,7 @@ add_mibdir(const char *dirname)
for (i = 0; i < filename_count; i++) {
if (add_mibfile(filenames[i], strrchr(filenames[i], '/'), ip) == 0)
count++;
free(filenames[i]);
}
File = oldFile;
if (ip)
Expand Down

0 comments on commit 2968b45

Please sign in to comment.