Commit 7bca3452 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

Fix file leak on malloc error in XlcDL.c:resolve_object()

File Leak: Leaked File fp at line 219 of lib/libX11/nx-X11/lib/X11/XlcDL.c in function 'resolve_object'. fp initialized at line 198 with fopen [ This bug was found by the Parfait 1.2.0 bug checking tool. http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ] Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: 's avatarMatthieu Herrb <matthieu.herrb@laas.fr> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent ce482d4f
......@@ -216,7 +216,8 @@ Limit the length of path to prevent stack buffer corruption.
xi18n_objects_list = (XI18NObjectsList)
Xrealloc(xi18n_objects_list,
sizeof(XI18NObjectsListRec) * lc_len);
if (!xi18n_objects_list) return;
if (!xi18n_objects_list)
goto done;
}
n = parse_line(p, args, 6);
......@@ -244,6 +245,7 @@ Limit the length of path to prevent stack buffer corruption.
lc_count++;
}
}
done:
fclose(fp);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment