psendfile: Don't free contype if it's NULL.
[ashd.git] / src / psendfile.c
index 52ec9dc..08cd1d2 100644 (file)
@@ -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);
 }