X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/059ec3d9952740285fb1ebf47961b8aca2eb1b4a..ac8aeb5485a80a06ac8a52b43b84210564cd7e09:/src/exim_monitor/em_xs.c diff --git a/src/exim_monitor/em_xs.c b/src/exim_monitor/em_xs.c index e3368f5d0..ac36b8f58 100644 --- a/src/exim_monitor/em_xs.c +++ b/src/exim_monitor/em_xs.c @@ -1,11 +1,10 @@ -/* $Cambridge: exim/src/exim_monitor/em_xs.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */ - /************************************************* * Exim Monitor * *************************************************/ -/* Copyright (c) University of Cambridge, 1995 - 2004 */ +/* Copyright (c) University of Cambridge, 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* This file contains a number of subroutines that are in effect just alternative packaging for calls to various X functions that @@ -32,15 +31,16 @@ void xs_SetValues(Widget w, Cardinal num_args, ...) { int i; va_list ap; -Arg *aa = (num_args > 15)? (Arg *)malloc(num_args*sizeof(Arg)) : xs_temparg; +Arg *aa = (num_args > 15)? store_malloc(num_args*sizeof(Arg)) : xs_temparg; va_start(ap, num_args); for (i = 0; i < num_args; i++) { aa[i].name = va_arg(ap, String); aa[i].value = va_arg(ap, XtArgVal); } +va_end(ap); XtSetValues(w, aa, num_args); -if (num_args > 15) free(aa); +if (num_args > 15) store_free(aa); } /* End of em_xs.c */