diff options
author | 2018-10-01 01:15:06 +0200 | |
---|---|---|
committer | 2018-10-01 01:15:06 +0200 | |
commit | ce0d66641d6cc5db9dc6214ac4fe064a0f668667 (patch) | |
tree | 0cd45bdff294dff726db4f611e9ca43c205f44db /src/firejail | |
parent | regression: fix whitelisting of symlinks to other home dirs, small improvements (diff) | |
download | firejail-ce0d66641d6cc5db9dc6214ac4fe064a0f668667.tar.gz firejail-ce0d66641d6cc5db9dc6214ac4fe064a0f668667.tar.zst firejail-ce0d66641d6cc5db9dc6214ac4fe064a0f668667.zip |
tiny memleaks
Diffstat (limited to 'src/firejail')
-rw-r--r-- | src/firejail/fs_whitelist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c index 531cc4e48..c4ab837c7 100644 --- a/src/firejail/fs_whitelist.c +++ b/src/firejail/fs_whitelist.c | |||
@@ -379,8 +379,8 @@ void fs_whitelist(void) { | |||
379 | fprintf(stderr, "*** Any file saved in this directory will be lost when the sandbox is closed.\n"); | 379 | fprintf(stderr, "*** Any file saved in this directory will be lost when the sandbox is closed.\n"); |
380 | fprintf(stderr, "***\n"); | 380 | fprintf(stderr, "***\n"); |
381 | } | 381 | } |
382 | free(new_name); | ||
383 | entry->data = EMPTY_STRING; | 382 | entry->data = EMPTY_STRING; |
383 | free(new_name); | ||
384 | continue; | 384 | continue; |
385 | } | 385 | } |
386 | 386 | ||
@@ -452,6 +452,7 @@ void fs_whitelist(void) { | |||
452 | } | 452 | } |
453 | 453 | ||
454 | entry->data = EMPTY_STRING; | 454 | entry->data = EMPTY_STRING; |
455 | free(new_name); | ||
455 | continue; | 456 | continue; |
456 | } | 457 | } |
457 | else if (arg_debug_whitelists) | 458 | else if (arg_debug_whitelists) |
@@ -470,6 +471,7 @@ void fs_whitelist(void) { | |||
470 | } | 471 | } |
471 | nowhitelist[nowhitelist_c++] = fname; | 472 | nowhitelist[nowhitelist_c++] = fname; |
472 | entry->data = EMPTY_STRING; | 473 | entry->data = EMPTY_STRING; |
474 | free(new_name); | ||
473 | continue; | 475 | continue; |
474 | } | 476 | } |
475 | 477 | ||
@@ -482,6 +484,7 @@ void fs_whitelist(void) { | |||
482 | 484 | ||
483 | entry->data = EMPTY_STRING; | 485 | entry->data = EMPTY_STRING; |
484 | free(fname); | 486 | free(fname); |
487 | free(new_name); | ||
485 | continue; | 488 | continue; |
486 | } | 489 | } |
487 | 490 | ||
@@ -640,6 +643,7 @@ void fs_whitelist(void) { | |||
640 | printf("Skip nowhitelisted path %s\n", fname); | 643 | printf("Skip nowhitelisted path %s\n", fname); |
641 | entry->data = EMPTY_STRING; | 644 | entry->data = EMPTY_STRING; |
642 | free(fname); | 645 | free(fname); |
646 | free(new_name); | ||
643 | continue; | 647 | continue; |
644 | } | 648 | } |
645 | } | 649 | } |