gluon-airtime: Fix memory leak and uninitialized struct
This commit is contained in:
parent
4322d8323c
commit
5ba752f6b1
@ -53,8 +53,6 @@ struct iface_list *get_ifaces() {
|
||||
|
||||
#undef CHECK
|
||||
|
||||
return ifaces;
|
||||
|
||||
out:
|
||||
if (msg)
|
||||
nlmsg_free(msg);
|
||||
@ -62,5 +60,5 @@ out:
|
||||
if (sk)
|
||||
nl_socket_free(sk);
|
||||
|
||||
return NULL;
|
||||
return ifaces;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ void fill_airtime_json(struct airtime_result *air, struct json_object *wireless)
|
||||
}
|
||||
|
||||
static struct json_object *respondd_provider_statistics(void) {
|
||||
struct airtime_result airtime;
|
||||
struct airtime_result airtime = {};
|
||||
struct json_object *result, *wireless;
|
||||
struct iface_list *ifaces;
|
||||
void *freeptr;
|
||||
|
Loading…
Reference in New Issue
Block a user