]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
11_recv-segfault.diff
authorGerrit Renker <grenker@cscs.ch>
Thu, 25 Feb 2010 16:05:46 +0000 (17:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 25 Feb 2010 16:05:46 +0000 (17:05 +0100)
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

recv.c

diff --git a/recv.c b/recv.c
index df1afb3685ff05dea7a9278b47ef9ef7e9a8971f..2618fd8e7ab34a202ef5971cf5918c5df8cf0338 100644 (file)
--- 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;