aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-posix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/jim-posix.c b/jim-posix.c
index 5c1ae7f..af8c0f1 100644
--- a/jim-posix.c
+++ b/jim-posix.c
@@ -187,6 +187,7 @@ static int Jim_PosixGethostnameCommand(Jim_Interp *interp, int argc, Jim_Obj *co
buf = Jim_Alloc(JIM_HOST_NAME_MAX);
if (gethostname(buf, JIM_HOST_NAME_MAX) == -1) {
Jim_PosixSetError(interp);
+ Jim_Free(buf);
rc = JIM_ERR;
}
else {