

Calls to strdup() alloc memory using malloc(), and there's a leak because we
never free() it. This patch fixes this by simply freeing the allocated memory.

Thanks to David Hill for reporting this bug.



---


diff -puN libjio.c~strdup_free libjio.c
--- cur/libjio.c~strdup_free	2004-03-30 22:58:52.000000000 -0300
+++ cur-root/libjio.c	2004-03-30 22:58:52.000000000 -0300
@@ -118,6 +118,9 @@ static int get_jdir(char *filename, char
 
 	snprintf(jdir, PATH_MAX, "%s/.%s.jio", dir, base);
 
+	free(baset);
+	free(dirt);
+
 	return 1;
 }
 
@@ -139,6 +142,9 @@ static int get_jtfile(char *filename, in
 
 	snprintf(jtfile, PATH_MAX, "%s/.%s.jio/%d", dir, base, tid);
 
+	free(baset);
+	free(dirt);
+
 	return 1;
 }
 

_
