do not free() NULL ssl context
authorMarcel Poul <marcel.poul@cern.ch>
Mon, 9 Jul 2012 14:42:52 +0000 (14:42 +0000)
committerMarcel Poul <marcel.poul@cern.ch>
Mon, 9 Jul 2012 14:42:52 +0000 (14:42 +0000)
emi.canl.canl-c/src/canl.c

index 5a7d503..4194e1b 100644 (file)
@@ -360,7 +360,8 @@ canl_io_accept(canl_ctx cc, canl_io_handler io, int new_fd,
 end:
     if (err) {
         (io_cc)->sock = -1;
-       mech->free_ctx(glb_cc, conn_ctx);
+        if (conn_ctx)
+            mech->free_ctx(glb_cc, conn_ctx);
     }
 
     return err;