From a6f39df3f76c9b7b5d851803c6644c24c673c051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Coursi=C3=A8re?= Date: Sun, 9 Dec 2012 03:45:16 +0000 Subject: [PATCH] Poorman : avoid a double free in ls method. Should fix #8617. Signed-off-by: Matt Madia --- src/apps/poorman/libhttpd/libhttpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/poorman/libhttpd/libhttpd.c b/src/apps/poorman/libhttpd/libhttpd.c index b982d1529d..dd9f5f68bd 100644 --- a/src/apps/poorman/libhttpd/libhttpd.c +++ b/src/apps/poorman/libhttpd/libhttpd.c @@ -2713,6 +2713,7 @@ ls( httpd_conn* hc ) send_mime( hc, 200, ok200title, "", "", "text/html; charset=%s", (off_t) -1, hc->sb.st_mtime ); + free(de); } else if ( hc->method == METHOD_GET ) { @@ -2947,7 +2948,6 @@ ls( httpd_conn* hc ) free(de); return -1; } - free(de); return 0; }