Skip to content

Commit bf2cbfc

Browse files
committed
Don't leak config->iolog.iolog_base
1 parent d8f1845 commit bf2cbfc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

logsrvd/logsrvd_conf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ cb_iolog_dir(struct logsrvd_config *config, const char *path, size_t offset)
363363
* iolog_base is the portion of iolog_dir that contains no escapes.
364364
* This is used to create a relative path for the log id.
365365
*/
366+
free(config->iolog.iolog_base);
366367
for (;;) {
367368
base_len += strcspn(path + base_len, "%");
368369
if (path[base_len] == '\0')
@@ -1591,6 +1592,7 @@ logsrvd_conf_free(struct logsrvd_config *config)
15911592
#endif
15921593

15931594
/* struct logsrvd_config_iolog */
1595+
free(config->iolog.iolog_base);
15941596
free(config->iolog.iolog_dir);
15951597
free(config->iolog.iolog_file);
15961598
iolog_pwfilt_free(config->iolog.passprompt_regex);

0 commit comments

Comments
 (0)