[hackers] [smdev] Remember to call freeifaddrs() || sin
commit e31c4112308c12cc8b4a88f1910b6996a6053c43
Author: sin <sin_AT_2f30.org>
Date: Thu Sep 4 15:11:24 2014 +0100
Remember to call freeifaddrs()
Change return value to void.
diff --git a/smdev.c b/smdev.c
index a3194da..e5788f5 100644
--- a/smdev.c
+++ b/smdev.c
_AT_@ -61,7 +61,7 @@ static int createdev(struct event *ev);
static int doevent(struct event *ev);
static int craftev(char *sysfspath);
static void populatedev(const char *path);
-static int ifrename(void);
+static void ifrename(void);
static void
usage(void)
_AT_@ -396,7 +396,7 @@ populatedev(const char *path)
}
}
-static int
+static void
ifrename(void)
{
struct ifaddrs *ifas, *ifa;
_AT_@ -430,7 +430,6 @@ ifrename(void)
}
}
}
-
+ freeifaddrs(ifas);
close(sd);
- return 0;
}
Received on Thu Sep 04 2014 - 16:12:52 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 04 2014 - 16:24:10 CEST