Don't exit() on memory alloc failure, return RLM_MODULE_FAIL instead.
authormgriego <mgriego>
Sat, 15 May 2004 14:57:41 +0000 (14:57 +0000)
committermgriego <mgriego>
Sat, 15 May 2004 14:57:41 +0000 (14:57 +0000)
src/modules/rlm_digest/rlm_digest.c

index 877f813..4ef3aea 100644 (file)
@@ -116,7 +116,7 @@ static int digest_authorize(void *instance, REQUEST *request)
                        sub = paircreate(PW_DIGEST_REALM - 1 + p[0],
                                         PW_TYPE_STRING);
                        if (!sub) {
-                               exit(1); /* out of memory */
+                               return RLM_MODULE_FAIL; /* out of memory */
                        }
                        memcpy(&sub->strvalue[0], &p[2], attrlen - 2);
                        sub->strvalue[attrlen - 2] = '\0';