diff options
author | sinanmohd <sinan@sinanmohd.com> | 2023-12-30 18:15:49 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2023-12-30 18:15:49 +0530 |
commit | 45daa3e2ea35cb92b5708104ce0da24249435feb (patch) | |
tree | 500ac6c96968123196cf13bd3b8fb39189417d47 /pass.c | |
parent | a042114987129a32c7d7d3243a46e0dfd00b13b2 (diff) |
pass.c: if allocation fails don't check for NULL and free
Diffstat (limited to 'pass.c')
-rw-r--r-- | pass.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -64,8 +64,6 @@ int add(const char *path) if (r < 0) { if (in != stdin) fclose(in); - if (p1) - free(p1); err_die(1, "%d:%s:", errno, strerror(errno)); } @@ -75,10 +73,8 @@ int add(const char *path) if (r < 0) { if (in != stdin) fclose(in); - if (p2) + if (p1) free(p1); - if (p2) - free(p2); err_die(1, "%d:%s:", errno, strerror(errno)); } |