aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ieee80211.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>2003-04-27 20:57:58 +0000
committerLaurent Deniel <laurent.deniel@free.fr>2003-04-27 20:57:58 +0000
commit4e9e69953627fb04006b837cafb321f4ce2903c3 (patch)
tree00c602dc312171ce7950b4adea022ab46ec65885 /packet-ieee80211.c
parent5f98b6206f7a671a30bfa095ea02c7f8cddfe7cc (diff)
Replace some unchecked malloc calls by g_malloc.
svn path=/trunk/; revision=7584
Diffstat (limited to 'packet-ieee80211.c')
-rw-r--r--packet-ieee80211.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/packet-ieee80211.c b/packet-ieee80211.c
index 4984dbe58b..9e3adc0f32 100644
--- a/packet-ieee80211.c
+++ b/packet-ieee80211.c
@@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
- * $Id: packet-ieee80211.c,v 1.85 2003/04/20 11:36:13 guy Exp $
+ * $Id: packet-ieee80211.c,v 1.86 2003/04/27 20:57:58 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2642,8 +2642,6 @@ static int wep_decrypt(guint8 *buf, guint32 len, int key_override) {
return 0;
}
-/* XXX need to verify these malloc()s succeed */
-
static void init_wepkeys(void) {
char *tmp, *tmp2;
guint8 *tmp3;
@@ -2669,8 +2667,8 @@ static void init_wepkeys(void) {
if (wep_keylens != NULL)
return;
- wep_keys = malloc(num_wepkeys * sizeof(guint8*));
- wep_keylens = malloc(num_wepkeys * sizeof(int));
+ wep_keys = g_malloc(num_wepkeys * sizeof(guint8*));
+ wep_keylens = g_malloc(num_wepkeys * sizeof(int));
for (i = 0 ; i < num_wepkeys; i++) {
wep_keys[i] = NULL;
@@ -2693,7 +2691,7 @@ static void init_wepkeys(void) {
#endif
#endif
- wep_keys[i] = malloc(32 * sizeof(guint8));
+ wep_keys[i] = g_malloc(32 * sizeof(guint8));
memset(wep_keys[i], 0, 32 * sizeof(guint8));
tmp3 = wep_keys[i];
while ((tmp != NULL) && (*tmp != 0)) {