Convert os_realloc() for an array to use os_realloc_array()
[mech_eap.git] / src / ap / utils.c
index 3e9fc08..07e289d 100644 (file)
@@ -23,8 +23,8 @@ int hostapd_register_probereq_cb(struct hostapd_data *hapd,
 {
        struct hostapd_probereq_cb *n;
 
-       n = os_realloc(hapd->probereq_cb, (hapd->num_probereq_cb + 1) *
-                      sizeof(struct hostapd_probereq_cb));
+       n = os_realloc_array(hapd->probereq_cb, hapd->num_probereq_cb + 1,
+                            sizeof(struct hostapd_probereq_cb));
        if (n == NULL)
                return -1;