From 1d3634e0cb6f226aa9474b08180281ce178cf461 Mon Sep 17 00:00:00 2001 From: Alexander Huemer Date: Wed, 12 Oct 2011 00:29:30 +0200 Subject: libctrl: only free() msgb if it was alloc()ed Before this patch a SIGABRT was caused when doing e.g.: $ ncat 127.0.0.1 4249 ^C --- openbsc/src/libctrl/control_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/src') diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c index 8198ae6b..d0813422 100644 --- a/openbsc/src/libctrl/control_if.c +++ b/openbsc/src/libctrl/control_if.c @@ -208,7 +208,7 @@ static int handle_control_read(struct osmo_fd * bfd) struct ctrl_connection *ccon; struct ipaccess_head *iph; struct ipaccess_head_ext *iph_ext; - struct msgb *msg; + struct msgb *msg = NULL; struct ctrl_cmd *cmd; struct ctrl_handle *ctrl = bfd->data; -- cgit v1.2.3