From: <tom...@us...> - 2013-02-08 03:59:56
|
Revision: 4014 http://razorbacktm.svn.sourceforge.net/razorbacktm/?rev=4014&view=rev Author: tomjudge Date: 2013-02-08 03:59:49 +0000 (Fri, 08 Feb 2013) Log Message: ----------- Don't leak the message if we fail to get the time Modified Paths: -------------- api/trunk/src/messages/output_inspection.c Modified: api/trunk/src/messages/output_inspection.c =================================================================== --- api/trunk/src/messages/output_inspection.c 2013-02-08 03:56:30 UTC (rev 4013) +++ api/trunk/src/messages/output_inspection.c 2013-02-08 03:59:49 UTC (rev 4014) @@ -56,19 +56,20 @@ message->status = reason; message->final = final; + msg->destroy = OutputInspection_Destroy; + msg->deserialize=OutputInspection_Deserialize; + msg->serialize=OutputInspection_Serialize; + memset(&l_tsTime, 0, sizeof(struct timespec)); if (clock_gettime(CLOCK_REALTIME, &l_tsTime) == -1) { rzb_log(LOG_ERR, "%s: Failed to get time stamp", __func__); + Message_Destroy(msg); return NULL; } message->seconds = l_tsTime.tv_sec; message->nanosecs = l_tsTime.tv_nsec; - msg->destroy = OutputInspection_Destroy; - msg->deserialize=OutputInspection_Deserialize; - msg->serialize=OutputInspection_Serialize; - return msg; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |