Free memory if out of memory
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Sep 2010 12:40:48 +0000 (14:40 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 9 Sep 2010 13:29:02 +0000 (15:29 +0200)
src/modules/rlm_eap/types/rlm_eap_md5/eap_md5.c

index dc87dc0..f87c8de 100644 (file)
@@ -228,6 +228,7 @@ int eapmd5_compose(EAP_DS *eap_ds, MD5_PACKET *reply)
 
                eap_ds->request->type.data = malloc(reply->length);
                if (eap_ds->request->type.data == NULL) {
+                       eapmd5_free(&reply);
                        radlog(L_ERR, "rlm_eap_md5: out of memory");
                        return 0;
                }