From: Peter Howkins Date: Wed, 4 Apr 2018 15:50:19 +0000 (+0100) Subject: dsdm: cov 86572, free mem in error condition X-Git-Tag: 2.2.4a~131 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2d91ff7a6f9bec681a974408a79330523a4f23f8;p=oweals%2Fcde.git dsdm: cov 86572, free mem in error condition --- diff --git a/cde/programs/dsdm/proxy.c b/cde/programs/dsdm/proxy.c index 3de6e0e4..529ba62e 100644 --- a/cde/programs/dsdm/proxy.c +++ b/cde/programs/dsdm/proxy.c @@ -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); byte_order = targets_list->byte_order; 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; + } /* no match, add our targets to the list */ old_size = Swap4Bytes(byte_order, targets_list->size);