From: Gerrit Renker Date: Thu, 25 Feb 2010 16:05:46 +0000 (+0100) Subject: 11_recv-segfault.diff X-Git-Tag: v0.4.2~34 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=c751c276e9c9b0f4d96b7fba45744d52fd2783be;p=paraslash.git 11_recv-segfault.diff This fixes a segmentation fault when trying to access a NULL rn.conf: vongole> para_recv -r 'dccp -i localhost -c 253' dccp_recv_ccid_support_check: 'CCID-253' not supported on this host. main: parse failed Segmentation fault --- diff --git a/recv.c b/recv.c index df1afb36..2618fd8e 100644 --- a/recv.c +++ b/recv.c @@ -115,7 +115,8 @@ out: r->close(&rn); btr_free_node(rn.btrn); btr_free_node(sot.btrn); - r->free_config(rn.conf); + if (rn.conf) + r->free_config(rn.conf); if (ret < 0) PARA_ERROR_LOG("%s\n", para_strerror(-ret)); return ret < 0? EXIT_FAILURE : EXIT_SUCCESS;