summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Huemer <alexander.huemer@xx.vu>2011-10-12 00:29:30 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-10-12 08:30:44 +0200
commit670ffe32900c9932f5fb1f3e836f77145bee94b7 (patch)
tree0c7ab8830a0a439564a4815e4975a67a569e890f
parent74c7dc36b6b487398678f30507649e2bee32bd0c (diff)
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
-rw-r--r--openbsc/src/libctrl/control_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c
index 8198ae6b7..d08134228 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;