From: Fredrik Tolf Date: Tue, 5 Jun 2012 00:10:52 +0000 (+0200) Subject: psendfile: Don't free contype if it's NULL. X-Git-Tag: 0.11~14 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=8f18d703d2b6edc2669aa36bf32497ebb1f8442f;hp=a0ef58b1f5b0759e7bcd19a4d6e1eceae0b51edb psendfile: Don't free contype if it's NULL. --- diff --git a/src/psendfile.c b/src/psendfile.c index 52ec9dc..08cd1d2 100644 --- a/src/psendfile.c +++ b/src/psendfile.c @@ -268,7 +268,8 @@ static void serve(struct muth *muth, va_list args) out: if(sfile != NULL) fclose(sfile); - free(contype); + if(contype != NULL) + free(contype); fclose(out); freehthead(req); }