[lxc-devel] [lxc/master] terminal: return NULL on error in terminal_signal_init
Blub on Github
lxc-bot at linuxcontainers.org
Tue Oct 29 07:58:55 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 505 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191029/7a4d178b/attachment-0001.bin>
-------------- next part --------------
From ce70ff7c4cd43fc23cbddbe4d09c56426a709fc7 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller at proxmox.com>
Date: Tue, 29 Oct 2019 08:42:59 +0100
Subject: [PATCH] terminal: return NULL on error in terminal_signal_init
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 at proxmox.com>
---
src/lxc/terminal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c
index 13953cf790..126eea475e 100644
--- a/src/lxc/terminal.c
+++ b/src/lxc/terminal.c
@@ -174,7 +174,7 @@ struct lxc_terminal_state *lxc_terminal_signal_init(int srcfd, int dstfd)
ts->sigfd = -1;
}
- return ts;
+ return NULL;
}
void lxc_terminal_signal_fini(struct lxc_terminal *terminal)
More information about the lxc-devel
mailing list