X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fexim_monitor%2Fem_xs.c;h=ee91f7c159c06ff85e4754c6f6670fbc98e92590;hb=ef546e788203ac3881abe2ddb17f3e24f6524d15;hp=87371b50c6e1be2eab05710fe2af886090f5460c;hpb=3634fc257bd0667daef14d72005cd87c735bbb24;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/exim_monitor/em_xs.c b/src/exim_monitor/em_xs.c index 87371b50c..ee91f7c15 100644 --- a/src/exim_monitor/em_xs.c +++ b/src/exim_monitor/em_xs.c @@ -2,7 +2,7 @@ * Exim Monitor * *************************************************/ -/* Copyright (c) University of Cambridge, 1995 - 2007 */ +/* Copyright (c) University of Cambridge, 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ /* This file contains a number of subroutines that are in effect @@ -30,15 +30,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 */