From 757db4df1c92bd16b787283ef0ae3c2dda70df9d Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 24 Jan 2013 19:58:02 +0900 Subject: Fix a leak --- vxi11_server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vxi11_server.c b/vxi11_server.c index 741b3fb..f8aa439 100644 --- a/vxi11_server.c +++ b/vxi11_server.c @@ -175,6 +175,13 @@ device_read_1_svc(Device_ReadParms *argp, struct svc_req *rqstp) { #ifdef DEBUG printf("device_read_1_svc()\n"); #endif + + if (result != NULL) { + free(result.data.data_val); + result.data.data_val = NULL; + result.data.data_len = 0; + } + if (!isValidLink(argp->lid)) result.error = ERR_INVALIDLINKINDENTIFIER; else if (isLocked() && !haveLock(argp->lid) && !waitForLock(argp->flags, argp->lock_timeout)) -- cgit