summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/req.c
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2011-08-30 16:34:42 +0400
committerKozlov Dmitry <xeb@mail.ru>2011-08-30 16:34:42 +0400
commit7a410baed07759ee3cef8c73b3d23f292355b005 (patch)
treee5421e6c44991f2e8f6e718afa41ee2c1c83e681 /accel-pppd/radius/req.c
parentc82ae5ec90ea56af314671ce09ca0f68694b745e (diff)
downloadaccel-ppp-7a410baed07759ee3cef8c73b3d23f292355b005.tar.gz
accel-ppp-7a410baed07759ee3cef8c73b3d23f292355b005.zip
radius: fix incorrect 'out of memory' message
Diffstat (limited to 'accel-pppd/radius/req.c')
-rw-r--r--accel-pppd/radius/req.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c
index 3c4a38b2..387cdd14 100644
--- a/accel-pppd/radius/req.c
+++ b/accel-pppd/radius/req.c
@@ -24,8 +24,10 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u
struct rad_plugin_t *plugin;
struct rad_req_t *req = _malloc(sizeof(*req));
- if (!req)
+ if (!req) {
+ log_emerg("radius: out of memory\n");
return NULL;
+ }
memset(req, 0, sizeof(*req));
req->rpd = rpd;
@@ -97,6 +99,10 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u
return req;
out_err:
+ if (!req->serv)
+ log_ppp_error("radius: no servers available\n");
+ else
+ log_emerg("radius: out of memory\n");
rad_req_free(req);
return NULL;
}