aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_addresses.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-11 13:33:04 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-11 13:33:04 +0000
commitf352a7faadcfa1cabbe726954f67f2ab46e62e6f (patch)
treeb35570224423a79f098282eb1f36ae8a727f63ff /src/ats/gnunet-service-ats_addresses.c
parente62cb236ec80d3a1435900f80727474bd98eaffa (diff)
downloadgnunet-f352a7faadcfa1cabbe726954f67f2ab46e62e6f.tar.gz
gnunet-f352a7faadcfa1cabbe726954f67f2ab46e62e6f.zip
-fix NPE
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.c')
-rw-r--r--src/ats/gnunet-service-ats_addresses.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 17f030a6c..e96197813 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -575,8 +575,13 @@ transmit_req_addr (struct AddressIteration *ai,
575 msg->plugin_name_length = htons (plugin_name_length); 575 msg->plugin_name_length = htons (plugin_name_length);
576 msg->bandwidth_out = bandwidth_out; 576 msg->bandwidth_out = bandwidth_out;
577 msg->bandwidth_in = bandwidth_in; 577 msg->bandwidth_in = bandwidth_in;
578 GNUNET_ATS_properties_hton (&msg->properties, 578 if (NULL != prop)
579 prop); 579 GNUNET_ATS_properties_hton (&msg->properties,
580 prop);
581 else
582 memset (&msg->properties,
583 0,
584 sizeof (struct GNUNET_ATS_Properties));
580 addrp = (char *) &msg[1]; 585 addrp = (char *) &msg[1];
581 if (NULL != plugin_addr) 586 if (NULL != plugin_addr)
582 memcpy (addrp, plugin_addr, plugin_addr_len); 587 memcpy (addrp, plugin_addr, plugin_addr_len);