mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dsdm: cov 86572, free mem in error condition
This commit is contained in:
parent
d87f6ce29d
commit
2d91ff7a6f
1 changed files with 3 additions and 1 deletions
|
@ -976,8 +976,10 @@ GetTargetsIndex(Display *dpy, unsigned char *in_data, unsigned long atom_cnt, CA
|
||||||
MatchTargets(targets_list, atoms, atom_cnt, targets_index_p);
|
MatchTargets(targets_list, atoms, atom_cnt, targets_index_p);
|
||||||
byte_order = targets_list->byte_order;
|
byte_order = targets_list->byte_order;
|
||||||
num_target_lists = Swap2Bytes(byte_order,targets_list->num_target_lists);
|
num_target_lists = Swap2Bytes(byte_order,targets_list->num_target_lists);
|
||||||
if (*targets_index_p < num_target_lists)
|
if (*targets_index_p < num_target_lists) {
|
||||||
|
free(targets_list);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* no match, add our targets to the list */
|
/* no match, add our targets to the list */
|
||||||
old_size = Swap4Bytes(byte_order, targets_list->size);
|
old_size = Swap4Bytes(byte_order, targets_list->size);
|
||||||
|
|
Loading…
Reference in a new issue