diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-21 00:54:49 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-21 00:54:49 +0200 |
commit | 30361fe0e89a72e2dd248a93824b06d858e4e81a (patch) | |
tree | 5cd5b9917bf1fb6899587683ab1680472c29194a /src/pt | |
parent | 172d6b0c471cd6512b8074d78f59ae9bb8cad9e7 (diff) | |
download | gnunet-30361fe0e89a72e2dd248a93824b06d858e4e81a.tar.gz gnunet-30361fe0e89a72e2dd248a93824b06d858e4e81a.zip |
make GNUNET_freez default, have GNUNET_free_nz for cases where that does not work
Diffstat (limited to 'src/pt')
-rw-r--r-- | src/pt/gnunet-daemon-pt.c | 2 | ||||
-rw-r--r-- | src/pt/test_gns_vpn.c | 5 | ||||
-rw-r--r-- | src/pt/test_gnunet_vpn.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c index f8765818b..bcc913bd2 100644 --- a/src/pt/gnunet-daemon-pt.c +++ b/src/pt/gnunet-daemon-pt.c | |||
@@ -1317,7 +1317,7 @@ main (int argc, | |||
1317 | NULL)) | 1317 | NULL)) |
1318 | ? 0 | 1318 | ? 0 |
1319 | : 1; | 1319 | : 1; |
1320 | GNUNET_free ((void *) argv); | 1320 | GNUNET_free_nz ((void *) argv); |
1321 | return ret; | 1321 | return ret; |
1322 | } | 1322 | } |
1323 | 1323 | ||
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 9bf497b16..69afca789 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "gnunet_gnsrecord_lib.h" | 45 | #include "gnunet_gnsrecord_lib.h" |
46 | #include "gnunet_gns_service.h" | 46 | #include "gnunet_gns_service.h" |
47 | #include "gnunet_testing_lib.h" | 47 | #include "gnunet_testing_lib.h" |
48 | #include "gnunet_mhd_compat.h" | ||
48 | 49 | ||
49 | #define PORT 8080 | 50 | #define PORT 8080 |
50 | #define TEST_DOMAIN "www.gnu" | 51 | #define TEST_DOMAIN "www.gnu" |
@@ -121,7 +122,7 @@ copy_buffer (void *ptr, | |||
121 | } | 122 | } |
122 | 123 | ||
123 | 124 | ||
124 | static int | 125 | static MHD_RESULT |
125 | mhd_ahc (void *cls, | 126 | mhd_ahc (void *cls, |
126 | struct MHD_Connection *connection, | 127 | struct MHD_Connection *connection, |
127 | const char *url, | 128 | const char *url, |
@@ -611,7 +612,7 @@ identity_cb (void *cls, | |||
611 | 1, &rd, | 612 | 1, &rd, |
612 | &commence_testing, | 613 | &commence_testing, |
613 | NULL); | 614 | NULL); |
614 | GNUNET_free ((void **) rd.data); | 615 | GNUNET_free_nz ((void **) rd.data); |
615 | GNUNET_free (rd_string); | 616 | GNUNET_free (rd_string); |
616 | } | 617 | } |
617 | 618 | ||
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index 42fd52c38..cb9bb61fe 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <microhttpd.h> | 29 | #include <microhttpd.h> |
30 | #include "gnunet_vpn_service.h" | 30 | #include "gnunet_vpn_service.h" |
31 | #include "gnunet_testing_lib.h" | 31 | #include "gnunet_testing_lib.h" |
32 | #include "gnunet_mhd_compat.h" | ||
32 | 33 | ||
33 | #define PORT 48080 | 34 | #define PORT 48080 |
34 | 35 | ||
@@ -96,7 +97,7 @@ copy_buffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
96 | } | 97 | } |
97 | 98 | ||
98 | 99 | ||
99 | static int | 100 | static MHD_RESULT |
100 | mhd_ahc (void *cls, | 101 | mhd_ahc (void *cls, |
101 | struct MHD_Connection *connection, | 102 | struct MHD_Connection *connection, |
102 | const char *url, | 103 | const char *url, |