Hi All,
I found a potential leak of memory pointed to by 'entry' in task.c and i
fix it.

Cheers,
Manuele
=== modified file 'uspace/srv/ns/task.c'
--- uspace/srv/ns/task.c	2015-09-30 17:47:41 +0000
+++ uspace/srv/ns/task.c	2016-07-06 11:02:57 +0000
@@ -241,8 +241,10 @@
 		return ENOMEM;
 	
 	hashed_task_t *ht = (hashed_task_t *) malloc(sizeof(hashed_task_t));
-	if (ht == NULL)
+	if (ht == NULL) {
+		free(entry);
 		return ENOMEM;
+	}
 	
 	/*
 	 * Insert into the phone-to-id map.

_______________________________________________
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to