gsm322: Fix resource leak in gsm322_init() while reading BA
Change-Id: Id42102ab8581e247f495fb7e05dc62a6743d28c5 Closes: CID#198546
This commit is contained in:
parent
5b759f7f1e
commit
5c2a64ca96
|
@ -5085,8 +5085,10 @@ int gsm322_init(struct osmocom_ms *ms)
|
|||
} else
|
||||
while(!feof(fp)) {
|
||||
ba = talloc_zero(ms, struct gsm322_ba_list);
|
||||
if (!ba)
|
||||
if (!ba) {
|
||||
fclose(fp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
rc = fread(buf, 4, 1, fp);
|
||||
if (!rc) {
|
||||
talloc_free(ba);
|
||||
|
|
Loading…
Reference in New Issue