diff options
Diffstat (limited to 'src/abd')
-rw-r--r-- | src/abd/gnunet-abd.c | 33 | ||||
-rw-r--r-- | src/abd/gnunet-service-abd.c | 18 | ||||
-rw-r--r-- | src/abd/plugin_gnsrecord_abd.c | 3 |
3 files changed, 30 insertions, 24 deletions
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c index f7e03fb4a..ff7dd09c5 100644 --- a/src/abd/gnunet-abd.c +++ b/src/abd/gnunet-abd.c | |||
@@ -513,8 +513,8 @@ get_existing_record (void *cls, | |||
513 | const struct GNUNET_GNSRECORD_Data *rd) | 513 | const struct GNUNET_GNSRECORD_Data *rd) |
514 | { | 514 | { |
515 | struct GNUNET_GNSRECORD_Data *rde; | 515 | struct GNUNET_GNSRECORD_Data *rde; |
516 | struct GNUNET_GNSRECORD_Data* rdn = | 516 | struct GNUNET_GNSRECORD_Data*rdn = |
517 | GNUNET_malloc(sizeof(*rdn)*(rd_count + 1)); | 517 | GNUNET_malloc (sizeof(*rdn) * (rd_count + 1)); |
518 | 518 | ||
519 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); | 519 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); |
520 | GNUNET_memcpy (&rdn[1], rd, | 520 | GNUNET_memcpy (&rdn[1], rd, |
@@ -541,7 +541,7 @@ get_existing_record (void *cls, | |||
541 | rde, | 541 | rde, |
542 | &add_continuation, | 542 | &add_continuation, |
543 | &add_qe); | 543 | &add_qe); |
544 | GNUNET_free(rdn); | 544 | GNUNET_free (rdn); |
545 | return; | 545 | return; |
546 | } | 546 | } |
547 | 547 | ||
@@ -604,13 +604,18 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
604 | if (GNUNET_OK != | 604 | if (GNUNET_OK != |
605 | GNUNET_GNSRECORD_string_to_value (type, subject, &data, &data_size)) | 605 | GNUNET_GNSRECORD_string_to_value (type, subject, &data, &data_size)) |
606 | { | 606 | { |
607 | if(typestring == NULL) { | 607 | if (typestring == NULL) |
608 | fputs("No value for unknown record type\n", stderr); | 608 | { |
609 | } else if(subject == NULL) { | 609 | fputs ("No value for unknown record type\n", stderr); |
610 | fprintf(stderr, | 610 | } |
611 | "No value for record type`%s'\n", | 611 | else if (subject == NULL) |
612 | typestring); | 612 | { |
613 | } else { | 613 | fprintf (stderr, |
614 | "No value for record type`%s'\n", | ||
615 | typestring); | ||
616 | } | ||
617 | else | ||
618 | { | ||
614 | fprintf (stderr, | 619 | fprintf (stderr, |
615 | "Value `%s' invalid for record type `%s'\n", | 620 | "Value `%s' invalid for record type `%s'\n", |
616 | subject, | 621 | subject, |
@@ -723,7 +728,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
723 | GNUNET_free (dele); | 728 | GNUNET_free (dele); |
724 | printf ("%s\n", res); | 729 | printf ("%s\n", res); |
725 | 730 | ||
726 | GNUNET_free_non_null (ego_name); | 731 | GNUNET_free (ego_name); |
727 | ego_name = NULL; | 732 | ego_name = NULL; |
728 | 733 | ||
729 | GNUNET_SCHEDULER_shutdown (); | 734 | GNUNET_SCHEDULER_shutdown (); |
@@ -927,8 +932,8 @@ run (void *cls, | |||
927 | int i; | 932 | int i; |
928 | while (NULL != (tok = strtok (NULL, ","))) | 933 | while (NULL != (tok = strtok (NULL, ","))) |
929 | count++; | 934 | count++; |
930 | struct GNUNET_ABD_Delegate* delegates = | 935 | struct GNUNET_ABD_Delegate*delegates = |
931 | GNUNET_malloc(sizeof(*delegates)*count); | 936 | GNUNET_malloc (sizeof(*delegates) * count); |
932 | struct GNUNET_ABD_Delegate *dele; | 937 | struct GNUNET_ABD_Delegate *dele; |
933 | GNUNET_free (tmp); | 938 | GNUNET_free (tmp); |
934 | tmp = GNUNET_strdup (subject_delegate); | 939 | tmp = GNUNET_strdup (subject_delegate); |
@@ -961,7 +966,7 @@ run (void *cls, | |||
961 | delegates[i].issuer_attribute = NULL; | 966 | delegates[i].issuer_attribute = NULL; |
962 | } | 967 | } |
963 | GNUNET_free (tmp); | 968 | GNUNET_free (tmp); |
964 | GNUNET_free(delegates); | 969 | GNUNET_free (delegates); |
965 | } | 970 | } |
966 | else | 971 | else |
967 | { | 972 | { |
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c index 36b0009ef..569d42295 100644 --- a/src/abd/gnunet-service-abd.c +++ b/src/abd/gnunet-service-abd.c | |||
@@ -364,14 +364,14 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text) | |||
364 | static void | 364 | static void |
365 | cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) | 365 | cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) |
366 | { | 366 | { |
367 | GNUNET_free_non_null (ds_entry->issuer_key); | 367 | GNUNET_free (ds_entry->issuer_key); |
368 | GNUNET_free_non_null (ds_entry->issuer_attribute); | 368 | GNUNET_free (ds_entry->issuer_attribute); |
369 | GNUNET_free_non_null (ds_entry->attr_trailer); | 369 | GNUNET_free (ds_entry->attr_trailer); |
370 | // those fields are only set/used in bw search | 370 | // those fields are only set/used in bw search |
371 | if (ds_entry->from_bw) | 371 | if (ds_entry->from_bw) |
372 | { | 372 | { |
373 | GNUNET_free_non_null (ds_entry->lookup_attribute); | 373 | GNUNET_free (ds_entry->lookup_attribute); |
374 | GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); | 374 | GNUNET_free (ds_entry->unresolved_attribute_delegation); |
375 | } | 375 | } |
376 | if (NULL != ds_entry->lookup_request) | 376 | if (NULL != ds_entry->lookup_request) |
377 | { | 377 | { |
@@ -380,9 +380,9 @@ cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) | |||
380 | } | 380 | } |
381 | if (NULL != ds_entry->delegation_chain_entry) | 381 | if (NULL != ds_entry->delegation_chain_entry) |
382 | { | 382 | { |
383 | GNUNET_free_non_null ( | 383 | GNUNET_free ( |
384 | ds_entry->delegation_chain_entry->subject_attribute); | 384 | ds_entry->delegation_chain_entry->subject_attribute); |
385 | GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); | 385 | GNUNET_free (ds_entry->delegation_chain_entry->issuer_attribute); |
386 | GNUNET_free (ds_entry->delegation_chain_entry); | 386 | GNUNET_free (ds_entry->delegation_chain_entry); |
387 | } | 387 | } |
388 | // Free DQ entries | 388 | // Free DQ entries |
@@ -423,11 +423,11 @@ cleanup_handle (struct VerifyRequestHandle *vrh) | |||
423 | GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head, | 423 | GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head, |
424 | vrh->del_chain_tail, | 424 | vrh->del_chain_tail, |
425 | del_entry); | 425 | del_entry); |
426 | GNUNET_free_non_null (del_entry->delegate); | 426 | GNUNET_free (del_entry->delegate); |
427 | GNUNET_free (del_entry); | 427 | GNUNET_free (del_entry); |
428 | } | 428 | } |
429 | } | 429 | } |
430 | GNUNET_free_non_null (vrh->issuer_attribute); | 430 | GNUNET_free (vrh->issuer_attribute); |
431 | GNUNET_free (vrh); | 431 | GNUNET_free (vrh); |
432 | } | 432 | } |
433 | 433 | ||
diff --git a/src/abd/plugin_gnsrecord_abd.c b/src/abd/plugin_gnsrecord_abd.c index 850fa9a45..272872e24 100644 --- a/src/abd/plugin_gnsrecord_abd.c +++ b/src/abd/plugin_gnsrecord_abd.c | |||
@@ -235,7 +235,8 @@ abd_string_to_value (void *cls, | |||
235 | (char *) &sets[1]); | 235 | (char *) &sets[1]); |
236 | for (i = 0; i < entries; i++) | 236 | for (i = 0; i < entries; i++) |
237 | { | 237 | { |
238 | if (0 != set[i].subject_attribute_len) { | 238 | if (0 != set[i].subject_attribute_len) |
239 | { | ||
239 | GNUNET_free_nz ((char *) set[i].subject_attribute); | 240 | GNUNET_free_nz ((char *) set[i].subject_attribute); |
240 | set[i].subject_attribute = NULL; | 241 | set[i].subject_attribute = NULL; |
241 | } | 242 | } |