From 77cb3bb8e2699dfa43bdcfa6e8e679bcaa8ce8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Mon, 26 Jul 2010 15:21:38 +0200 Subject: Fix compiler warnings in erl_interface - Removed unused variable in ei_decode_term.c - Fixed faulty deallocation --- lib/erl_interface/src/prog/erl_call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/erl_interface/src/prog') diff --git a/lib/erl_interface/src/prog/erl_call.c b/lib/erl_interface/src/prog/erl_call.c index f0d638324d..93b84cbb36 100644 --- a/lib/erl_interface/src/prog/erl_call.c +++ b/lib/erl_interface/src/prog/erl_call.c @@ -812,7 +812,8 @@ static int get_module(char **mbuf, char **mname) *mname = (char *) calloc(i+1, sizeof(char)); memcpy(*mname, start, i); } - free(mbuf); /* Allocated in read_stdin() */ + if (*mbuf) + free(*mbuf); /* Allocated in read_stdin() */ return len; -- cgit v1.2.3