diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-01 14:10:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-01 14:10:23 +0000 |
commit | aaad91acd22b6204c97690a032e5c623f57376cc (patch) | |
tree | 46bdae9b0dca5e1f9a247eb8897573750fea59e6 /src/json/json_helper.c | |
parent | 669d5032383c22014233fe0732a5485494b1b469 (diff) | |
download | gnunet-aaad91acd22b6204c97690a032e5c623f57376cc.tar.gz gnunet-aaad91acd22b6204c97690a032e5c623f57376cc.zip |
-null out ptrs on init
Diffstat (limited to 'src/json/json_helper.c')
-rw-r--r-- | src/json/json_helper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c index 7265dfa66..dca2106aa 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c | |||
@@ -244,6 +244,7 @@ GNUNET_JSON_spec_string (const char *name, | |||
244 | .ptr_size = 0, | 244 | .ptr_size = 0, |
245 | .size_ptr = NULL | 245 | .size_ptr = NULL |
246 | }; | 246 | }; |
247 | *strptr = NULL; | ||
247 | return ret; | 248 | return ret; |
248 | } | 249 | } |
249 | 250 | ||
@@ -283,6 +284,7 @@ clean_object (void *cls, | |||
283 | struct GNUNET_JSON_Specification *spec) | 284 | struct GNUNET_JSON_Specification *spec) |
284 | { | 285 | { |
285 | json_t **ptr = (json_t **) spec->ptr; | 286 | json_t **ptr = (json_t **) spec->ptr; |
287 | |||
286 | if (NULL != *ptr) | 288 | if (NULL != *ptr) |
287 | { | 289 | { |
288 | json_decref (*ptr); | 290 | json_decref (*ptr); |
@@ -310,6 +312,7 @@ GNUNET_JSON_spec_json (const char *name, | |||
310 | .ptr_size = 0, | 312 | .ptr_size = 0, |
311 | .size_ptr = NULL | 313 | .size_ptr = NULL |
312 | }; | 314 | }; |
315 | *jsonp = NULL; | ||
313 | return ret; | 316 | return ret; |
314 | } | 317 | } |
315 | 318 | ||
@@ -765,6 +768,7 @@ GNUNET_JSON_spec_rsa_public_key (const char *name, | |||
765 | .ptr_size = 0, | 768 | .ptr_size = 0, |
766 | .size_ptr = NULL | 769 | .size_ptr = NULL |
767 | }; | 770 | }; |
771 | *pk = NULL; | ||
768 | return ret; | 772 | return ret; |
769 | } | 773 | } |
770 | 774 | ||
@@ -857,6 +861,7 @@ GNUNET_JSON_spec_rsa_signature (const char *name, | |||
857 | .ptr_size = 0, | 861 | .ptr_size = 0, |
858 | .size_ptr = NULL | 862 | .size_ptr = NULL |
859 | }; | 863 | }; |
864 | *sig = NULL; | ||
860 | return ret; | 865 | return ret; |
861 | } | 866 | } |
862 | 867 | ||