]> git.proxmox.com Git - mirror_lxc.git/commitdiff
terminal: return NULL on error in terminal_signal_init
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 29 Oct 2019 07:42:59 +0000 (08:42 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 29 Oct 2019 07:42:59 +0000 (08:42 +0100)
Callers expect a NULL on error, and with PR #3171 marking
the pointer as __do_free, we now return a pointer to freed
memory here otherwise.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/terminal.c

index 13953cf790e4f04f2065f51e1d0a0da01dd28b57..126eea475e48e6d1c57244b139d228e293293948 100644 (file)
@@ -174,7 +174,7 @@ on_error:
                ts->sigfd = -1;
        }
 
-       return ts;
+       return NULL;
 }
 
 void lxc_terminal_signal_fini(struct lxc_terminal *terminal)