]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/radius/config.c
Various fixes for errors found by coverity static analysis (#109)
[ppp.git] / pppd / plugins / radius / config.c
index a29e5e8da90918ffd446b4fda92ca847a4d50667..6e36d898a27a58bdae7e29f8e616797ff1eb0ab2 100644 (file)
@@ -153,6 +153,7 @@ static int set_option_auo(char *filename, int line, OPTION *option, char *p)
                        *iptr = AUTH_RADIUS_FST;
        else {
                error("%s: auth_order: unknown keyword: %s", filename, p);
+               free(iptr);
                return (-1);
        }
 
@@ -165,6 +166,7 @@ static int set_option_auo(char *filename, int line, OPTION *option, char *p)
                        *iptr = (*iptr) | AUTH_RADIUS_SND;
                else {
                        error("%s: auth_order: unknown or unexpected keyword: %s", filename, p);
+                       free(iptr);
                        return (-1);
                }
        }
@@ -272,7 +274,7 @@ char *rc_conf_str(char *optname)
 
        if (option == NULL)
                fatal("rc_conf_str: unkown config option requested: %s", optname);
-               return (char *)option->val;
+       return (char *)option->val;
 }
 
 int rc_conf_int(char *optname)