From fc49e23c889d3cafb97115dc1114d2946663068a Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 2 Jul 2020 21:34:14 +0200 Subject: netspeed: fix memory leaks on backend --- netspeed/src/backend.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'netspeed/src/backend.h') diff --git a/netspeed/src/backend.h b/netspeed/src/backend.h index 3ad13e94..ffc1ad37 100644 --- a/netspeed/src/backend.h +++ b/netspeed/src/backend.h @@ -51,7 +51,7 @@ typedef enum DEV_PLIP, DEV_SLIP, DEV_UNKNOWN // this has to be the last one -} DevType; +} DevType; /* Some information about the selected network device */ @@ -59,11 +59,11 @@ typedef struct { DevType type; char *name; - char *ip; - char *netmask; + char ip[INET_ADDRSTRLEN]; + char netmask[INET_ADDRSTRLEN]; guint8 hwaddr[ETH_ALEN]; - char *ptpip; - char *ipv6; + char ptpip[INET_ADDRSTRLEN]; + char ipv6[INET6_ADDRSTRLEN]; char *essid; gboolean up, running; guint64 tx, rx; @@ -97,7 +97,7 @@ void free_device_info(DevInfo *devinfo); void -get_device_info(const char *device, DevInfo *info); +get_device_info(const char *device, DevInfo **info); gboolean compare_device_info(const DevInfo *a, const DevInfo *b); -- cgit v1.2.1