[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29307 - gnunet/src/scalarproduct
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29307 - gnunet/src/scalarproduct |
Date: |
Mon, 16 Sep 2013 14:37:16 +0200 |
Author: cfuchs
Date: 2013-09-16 14:37:16 +0200 (Mon, 16 Sep 2013)
New Revision: 29307
Modified:
gnunet/src/scalarproduct/scalarproduct_api.c
Log:
fixed a possible free-of-null in the SP-API
modified if-clause to check for the opposite, correct condition
Modified: gnunet/src/scalarproduct/scalarproduct_api.c
===================================================================
--- gnunet/src/scalarproduct/scalarproduct_api.c 2013-09-16 12:36:33 UTC
(rev 29306)
+++ gnunet/src/scalarproduct/scalarproduct_api.c 2013-09-16 12:37:16 UTC
(rev 29307)
@@ -502,11 +502,11 @@
if (qe == h)
{
GNUNET_CONTAINER_DLL_remove (head, tail, qe);
- if (NULL == qe->th)
+ if (NULL != qe->th)
GNUNET_CLIENT_notify_transmit_ready_cancel (qe->th);
GNUNET_CLIENT_disconnect (qe->client);
GNUNET_STATISTICS_destroy (qe->stats, GNUNET_YES);
- GNUNET_free (qe->msg);
+ GNUNET_free_non_null (qe->msg);
GNUNET_free (qe);
break;
}
@@ -525,11 +525,11 @@
for (qe = head; head != NULL; qe = head)
{
GNUNET_CONTAINER_DLL_remove (head, tail, qe);
- if (NULL == qe->th)
+ if (NULL != qe->th)
GNUNET_CLIENT_notify_transmit_ready_cancel (qe->th);
GNUNET_CLIENT_disconnect (qe->client);
GNUNET_STATISTICS_destroy (qe->stats, GNUNET_YES);
- GNUNET_free (qe->msg);
+ GNUNET_free_non_null (qe->msg);
GNUNET_free (qe);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29307 - gnunet/src/scalarproduct,
gnunet <=