diff options
-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)) |