No need to have a common failure handler if it is used from only a
single location and that lcoation does not even need the memory freeing
step.
Signed-off-by: Jouni Malinen <j@w1.fi>
uuid_bin2str(iface->wps->uuid, uuid_string, sizeof(uuid_string));
msg = wpabuf_alloc(800); /* more than big enough */
if (msg == NULL)
- goto fail;
+ return NULL;
switch (a->type) {
case ADVERTISE_UP:
case ADVERTISE_DOWN:
*islast = 1;
return msg;
-
-fail:
- wpabuf_free(msg);
- return NULL;
}