[haiku-commits] haiku: hrev43331 - src/apps/poorman/libhttpd

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 27 Nov 2011 03:57:52 +0100 (CET)

hrev43331 adds 1 changeset to branch 'master'
old head: 374d5a4c6df1a191b023c906459b9b51cc782e00
new head: a633338fbedcad32a50f709d567b0356692a068c

----------------------------------------------------------------------------

1 files changed, 5 insertions(+), 2 deletions(-)
src/apps/poorman/libhttpd/libhttpd.c |    7 +++++--

############################################################################

Revision:    hrev43331
Commit:      a633338fbedcad32a50f709d567b0356692a068c
URL:         http://cgit.haiku-os.org/haiku/commit/?id=a633338
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Sun Nov 27 02:57:05 2011 UTC

Memory leak fix

CID 5769

----------------------------------------------------------------------------

diff --git a/src/apps/poorman/libhttpd/libhttpd.c 
b/src/apps/poorman/libhttpd/libhttpd.c
index 1c45239..b982d15 100644
--- a/src/apps/poorman/libhttpd/libhttpd.c
+++ b/src/apps/poorman/libhttpd/libhttpd.c
@@ -2703,6 +2703,7 @@ ls( httpd_conn* hc )
        poorman_log(logString, true, hc->client_addr.sa_in.sin_addr.s_addr, 
RED);
 //     syslog( LOG_ERR, "opendir %.80s - %m", hc->expnfilename );
        httpd_send_err( hc, 404, err404title, "", err404form, hc->encodedurl );
+       free(de);
        return -1;
        }
 
@@ -2758,6 +2759,7 @@ ls( httpd_conn* hc )
                    hc, 500, err500title, "", err500form, hc->encodedurl );
                httpd_write_response( hc );
                closedir( dirp );
+               free(de);
                return  -1;
                }
 
@@ -2942,10 +2944,11 @@ ls( httpd_conn* hc )
        closedir( dirp );
        httpd_send_err(
            hc, 501, err501title, "", err501form, httpd_method_str( hc->method 
) );
+       free(de);
        return -1;
        }
-
-    return 0;
+       free(de);
+       return 0;
     }
 
 #endif /* GENERATE_INDEXES */


Other related posts:

  • » [haiku-commits] haiku: hrev43331 - src/apps/poorman/libhttpd - stpere