diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-08-12 16:34:39 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-08-14 18:53:02 +0100 |
commit | 629726dfea57d03219c00b9e8972ef3d1d550446 (patch) | |
tree | c0adf13aea624986be665fc22711cecccf8f3dad | |
parent | d4f01298105bb8c97e7ac0cad0e78f0ffe261354 (diff) | |
download | fstools-629726dfea57d03219c00b9e8972ef3d1d550446.tar.gz |
blockd: fix resource leak discovered by coverity scan
Fixes Coverity CID 1463265
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | blockd.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -152,6 +152,9 @@ static int hotplug_call_mount(struct ubus_context *ctx, const char *action, pid = fork(); switch (pid) { case -1: + if (c) + free(c); + err = -errno; ULOG_ERR("fork() failed\n"); return err; |