1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

ffserver: break early on _parse_acl_row()

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
This commit is contained in:
Reynaldo H. Verdejo Pinochet
2015-09-18 15:32:39 -07:00
parent c677b42f79
commit eb613877bf

View File

@@ -116,6 +116,8 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
{ {
char arg[1024]; char arg[1024];
FFServerIPAddressACL acl; FFServerIPAddressACL acl;
FFServerIPAddressACL *nacl;
FFServerIPAddressACL **naclp;
int errors = 0; int errors = 0;
ffserver_get_arg(arg, sizeof(arg), &p); ffserver_get_arg(arg, sizeof(arg), &p);
@@ -150,9 +152,11 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
} }
} }
if (!errors) { if (errors)
FFServerIPAddressACL *nacl = av_mallocz(sizeof(*nacl)); return;
FFServerIPAddressACL **naclp = 0;
nacl = av_mallocz(sizeof(*nacl));
naclp = 0;
acl.next = 0; acl.next = 0;
*nacl = acl; *nacl = acl;
@@ -166,7 +170,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
else { else {
fprintf(stderr, "%s:%d: ACL found not in <Stream> or <Feed>\n", fprintf(stderr, "%s:%d: ACL found not in <Stream> or <Feed>\n",
filename, line_num); filename, line_num);
errors++; errors++; /* FIXME: No effect whatsoever */
} }
if (naclp) { if (naclp) {
@@ -176,7 +180,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
*naclp = nacl; *naclp = nacl;
} else } else
av_free(nacl); av_free(nacl);
}
} }
/* add a codec and set the default parameters */ /* add a codec and set the default parameters */