Hi, On Mon, 2015-10-05 at 14:31 +0530, Maneesh Jain wrote: > Signed-off-by: Maneesh Jain <maneesh.j...@samsung.com> > --- > gsupplicant/supplicant.c | 6 ++++++ > 1 files changed, 6 insertions(+) > > diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c > index 98ca94b..9506f02 > --- a/gsupplicant/supplicant.c > +++ b/gsupplicant/supplicant.c > @@ -2804,6 +2804,9 @@ static void signal_peer_found(const char *path, > DBusMessageIter *iter) > g_hash_table_replace(peer_mapping, peer->path, interface); > > property_data = dbus_malloc0(sizeof(struct peer_property_data)); > + if (!property_data) > + return; > +
NACK. With the above code there will be a peer object without any of its associated data. Not a good thing. Please do the needed allocations first, and if either fail, don't add a new peer. > property_data->peer = peer; > > dbus_message_iter_next(iter); > @@ -2861,6 +2864,9 @@ static void signal_peer_changed(const char *path, > DBusMessageIter *iter) > } > > property_data = dbus_malloc0(sizeof(struct peer_property_data)); > + if (!property_data) > + return; > + Same here. This time the peer is not updated, though. > property_data->peer = peer; > > supplicant_dbus_property_foreach(iter, peer_property, property_data); Patrik _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman