Skip to content

Commit ebbf88e

Browse files
authored
Merge pull request #139 from softwareschneiderei/fix_build_path_memory_leak
Fix build_path memory leak
2 parents 921001c + 4a4130e commit ebbf88e

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)