aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_common.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-13 16:56:26 (GMT)
committerJouni Malinen <j@w1.fi>2011-11-13 16:56:26 (GMT)
commitaea855d75217b58a9a8644bd537bbd4e23abbbb9 (patch)
tree13c5b054267c19125a07162206024e1c4e656a91 /src/drivers/driver_common.c
parenta4cef16279e07acbf2864c1b84d65bb192c15e83 (diff)
downloadhostap-aea855d75217b58a9a8644bd537bbd4e23abbbb9.zip
hostap-aea855d75217b58a9a8644bd537bbd4e23abbbb9.tar.gz
hostap-aea855d75217b58a9a8644bd537bbd4e23abbbb9.tar.bz2
Move wpa_scan_results_free() into shared C file
Replace the inline helper function with a new C file that can be used for common driver API related function. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/drivers/driver_common.c')
-rw-r--r--src/drivers/driver_common.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
new file mode 100644
index 0000000..3ea16e9
--- /dev/null
+++ b/src/drivers/driver_common.c
@@ -0,0 +1,30 @@
+/*
+ * Common driver-related functions
+ * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#include "includes.h"
+#include "utils/common.h"
+#include "driver.h"
+
+void wpa_scan_results_free(struct wpa_scan_results *res)
+{
+ size_t i;
+
+ if (res == NULL)
+ return;
+
+ for (i = 0; i < res->num; i++)
+ os_free(res->res[i]);
+ os_free(res->res);
+ os_free(res);
+}