]> sourceware.org Git - lvm2.git/commitdiff
coverity: missing free on error path
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 25 Feb 2018 15:17:42 +0000 (16:17 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 28 Feb 2018 20:05:18 +0000 (21:05 +0100)
daemons/dmfilemapd/dmfilemapd.c

index aa50242ecbaeab8c106ea2602ad40be6947df683..7519799d1966a864713dd485e1167a56dc4404db 100644 (file)
@@ -802,7 +802,7 @@ bad:
        return 1;
 }
 
-static const char * _mode_names[] = {
+static const char * const _mode_names[] = {
        "inode",
        "path"
 };
@@ -827,8 +827,10 @@ int main(int argc, char **argv)
                 "mode=%s, path=%s", fm.fd, fm.group_id,
                 _mode_names[fm.mode], fm.path);
 
-       if (!_foreground && !_daemonise(&fm))
+       if (!_foreground && !_daemonise(&fm)) {
+               dm_free(fm.path);
                return 1;
+       }
 
        return _dmfilemapd(&fm);
 }
This page took 1.796682 seconds and 5 git commands to generate.