Skip to content

Commit 4a4130e

Browse files
author
Marius Elvert
committed
Fix build_path memory leak
1 parent 921001c commit 4a4130e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ BBIO_err build_path(const char *partial_path, const char *prefix, char *full_pat
376376
int (*errfunc) (const char *epath, int eerrno),
377377
glob_t *pglob); */
378378
int err = glob(pattern, 0, NULL, &results);
379+
free(pattern);
379380
if (err != BBIO_OK) {
380381
globfree(&results);
381382
if (err == GLOB_NOSPACE)

0 commit comments

Comments
 (0)