free(inst) on OOM
authoraland <aland>
Sat, 7 Apr 2007 22:16:39 +0000 (22:16 +0000)
committeraland <aland>
Sat, 7 Apr 2007 22:16:39 +0000 (22:16 +0000)
This fixes Coverity bug #23

src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c

index f88dae0..529eefb 100644 (file)
@@ -501,6 +501,7 @@ static int eaptls_attach(CONF_SECTION *cs, void **instance)
         */
        conf = (EAP_TLS_CONF *)malloc(sizeof(*conf));
        if (conf == NULL) {
+               free(inst);
                radlog(L_ERR, "rlm_eap_tls: out of memory");
                return -1;
        }