diff options
author | daniel <danieruru@gmail.com> | 2013-01-24 19:58:02 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-24 19:58:02 +0900 |
commit | 757db4df1c92bd16b787283ef0ae3c2dda70df9d (patch) | |
tree | 18d3d4ff8c610aee2b8728471ff497a0c4e9834f /vxi11_server.c | |
parent | ee1a47c7b3ee397b9ee8e8d13512affb6ead33c0 (diff) |
Fix a leak
Diffstat (limited to 'vxi11_server.c')
-rw-r--r-- | vxi11_server.c | 7 |
1 files changed, 7 insertions, 0 deletions
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)) |