about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <camille.mougey@cea.fr>2015-02-23 14:12:24 +0100
committerCamille Mougey <camille.mougey@cea.fr>2015-02-23 14:12:24 +0100
commitffe78d3adb4a13fa27c4064f78aebcaff6be72c9 (patch)
tree79990adcc72c50b85d84294aecb78995b0bb0cb9
parent4713279e25625b33b8867c35d7da686781b8b9a7 (diff)
downloadmiasm-ffe78d3adb4a13fa27c4064f78aebcaff6be72c9.tar.gz
miasm-ffe78d3adb4a13fa27c4064f78aebcaff6be72c9.zip
VmMngr: resource leak (`mpn`) if `(!p)` is taken
-rw-r--r--miasm2/jitter/vm_mngr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/miasm2/jitter/vm_mngr.c b/miasm2/jitter/vm_mngr.c
index 057c10be..f74830fd 100644
--- a/miasm2/jitter/vm_mngr.c
+++ b/miasm2/jitter/vm_mngr.c
@@ -1296,6 +1296,7 @@ struct memory_page_node * create_memory_page_node(uint64_t ad, unsigned int size
 	}
 	p = malloc(size);
 	if (!p){
+		free(mpn);
 		fprintf(stderr, "cannot alloc %d\n", size);
 		return NULL;
 	}