X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2Fclientid.c;h=eea516505d730436569aa0070ec197d9be4fbf0f;hb=HEAD;hp=09ec3d04c56346e309d0c209690214dcbe9dd3d8;hpb=ef8ec1132273c3dbff2387f117630bbeb3f23f8e;p=ppp.git diff --git a/pppd/plugins/radius/clientid.c b/pppd/plugins/radius/clientid.c index 09ec3d0..eea5165 100644 --- a/pppd/plugins/radius/clientid.c +++ b/pppd/plugins/radius/clientid.c @@ -68,6 +68,7 @@ int rc_read_mapfile(char *filename) if ((p = (struct map2id_s *)malloc(sizeof(*p))) == NULL) { novm("rc_read_mapfile"); + fclose(mapfd); return (-1); } @@ -79,6 +80,7 @@ int rc_read_mapfile(char *filename) } else { error("rc_read_mapfile: malformed line in %s, line %d", filename, lnr); + fclose(mapfd); return (-1); } @@ -101,7 +103,7 @@ int rc_read_mapfile(char *filename) * Returns: port id, zero if no entry found */ -UINT4 rc_map2id(char *name) +UINT4 rc_map2id(const char *name) { struct map2id_s *p; char ttyname[PATH_MAX];