From 00d74ec45b1c26ec2d8bd9f2a32df79873f4a24b Mon Sep 17 00:00:00 2001 From: m0gg Date: Sat, 16 Dec 2006 15:55:24 +0000 Subject: soap.udp socket errors fixed --- nanohttp/nanohttp-common.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'nanohttp/nanohttp-common.c') diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c index a7f7f50..9b5015e 100644 --- a/nanohttp/nanohttp-common.c +++ b/nanohttp/nanohttp-common.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-common.c,v 1.36 2006/12/10 19:21:06 m0gg Exp $ +* $Id: nanohttp-common.c,v 1.37 2006/12/16 15:55:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -193,8 +193,11 @@ hpairnode_free(hpair_t * pair) if (pair == NULL) return; - free(pair->key); - free(pair->value); + if (pair->key) + free(pair->key); + + if (pair->value) + free(pair->value); free(pair); @@ -462,7 +465,7 @@ attachments_free(struct attachments_t *message) { struct part_t *tmp, *part; - if (message == NULL) + if (!message) return; part = message->parts; -- cgit v1.1-32-gdbae