Use the same reverse goto on error as everywhere else...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 10 Apr 2015 00:50:13 +0000 (20:50 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 10 Apr 2015 01:01:22 +0000 (21:01 -0400)
src/main/map.c

index 7045cd6..5614fe9 100644 (file)
@@ -325,7 +325,9 @@ int map_afrom_cs(value_pair_map_t **out, CONF_SECTION *cs,
             ci = cf_item_find_next(cs, ci)) {
                if (total++ == max) {
                        cf_log_err(ci, "Map size exceeded");
-                       goto error;
+               error:
+                       TALLOC_FREE(*out);
+                       return -1;
                }
 
                if (!cf_item_is_pair(ci)) {
@@ -350,9 +352,7 @@ int map_afrom_cs(value_pair_map_t **out, CONF_SECTION *cs,
        }
 
        return 0;
-error:
-       TALLOC_FREE(*out);
-       return -1;
+
 }