summaryrefslogtreecommitdiff
path: root/netspeed/src/backend.h
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-07-02 21:34:14 +0200
committerraveit65 <[email protected]>2020-07-28 11:44:01 +0200
commitfc49e23c889d3cafb97115dc1114d2946663068a (patch)
tree105333fd05c97fc7d2664b157d42724a37e5df4b /netspeed/src/backend.h
parent3ac3173fc8451e578e3e5a4c9371a32a6617cda9 (diff)
downloadmate-applets-fc49e23c889d3cafb97115dc1114d2946663068a.tar.bz2
mate-applets-fc49e23c889d3cafb97115dc1114d2946663068a.tar.xz
netspeed: fix memory leaks on backend
Diffstat (limited to 'netspeed/src/backend.h')
-rw-r--r--netspeed/src/backend.h12
1 files changed, 6 insertions, 6 deletions
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);