Ticket #8617: 0001-Poorman-avoid-a-double-free-in-ls-method.-Should-fix.patch

File 0001-Poorman-avoid-a-double-free-in-ls-method.-Should-fix.patch, 903 bytes (added by oco, 11 years ago)
  • src/apps/poorman/libhttpd/libhttpd.c

    From 341151f41dd6430e18add48365f1e9d17c7c1499 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Olivier=20Coursi=C3=A8re?= <olivier.coursiere@laposte.net>
    Date: Sun, 9 Dec 2012 03:45:16 +0000
    Subject: [PATCH] Poorman : avoid a double free in ls method. Should fix
     #8617.
    
    ---
     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 b982d15..dd9f5f6 100644
    a b ls( httpd_conn* hc )  
    27132713    send_mime(
    27142714        hc, 200, ok200title, "", "", "text/html; charset=%s", (off_t) -1,
    27152715        hc->sb.st_mtime );
     2716    free(de);
    27162717    }
    27172718    else if ( hc->method == METHOD_GET )
    27182719    {
    ls( httpd_conn* hc )  
    29472948    free(de);
    29482949    return -1;
    29492950    }
    2950     free(de);
    29512951    return 0;
    29522952    }
    29532953