]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxclock: logically dead code
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 10:13:36 +0000 (11:13 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 10 Dec 2020 19:39:54 +0000 (20:39 +0100)
Fixes: Coverity 1461722
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxclock.c

index 318e5bf5a32afa58b1f1411ec0de91f643be4041..a77951a5b4d74fab9bd133f756759eb5d0ed87d7 100644 (file)
@@ -169,8 +169,6 @@ struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name)
        l->type = LXC_LOCK_FLOCK;
        l->u.f.fname = lxclock_name(lxcpath, name);
        if (!l->u.f.fname) {
-               if (!name)
-                       free(l->u.sem);
                free(l);
                l = NULL;
                goto on_error;