aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/prog/erl_call.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2010-07-27 14:35:28 +0200
committerBjörn-Egil Dahlberg <[email protected]>2010-07-27 14:35:28 +0200
commit25d163b9b854e1a4daee977ac3514b5252843218 (patch)
tree3a0d6ba46600146970d419fdef85b85f60eec5b3 /lib/erl_interface/src/prog/erl_call.c
parenta2fb9485642c174117e6fe09189a53d2c510bb14 (diff)
parent77cb3bb8e2699dfa43bdcfa6e8e679bcaa8ce8b8 (diff)
downloadotp-25d163b9b854e1a4daee977ac3514b5252843218.tar.gz
otp-25d163b9b854e1a4daee977ac3514b5252843218.tar.bz2
otp-25d163b9b854e1a4daee977ac3514b5252843218.zip
Merge branch 'egil/clean-erl_interface-warnings/OTP-8748' into dev
* egil/clean-erl_interface-warnings/OTP-8748: Fix compiler warnings in erl_interface
Diffstat (limited to 'lib/erl_interface/src/prog/erl_call.c')
-rw-r--r--lib/erl_interface/src/prog/erl_call.c3
1 files changed, 2 insertions, 1 deletions
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;