Commit 28187956 authored by Alessandro Rubini's avatar Alessandro Rubini

tools/stamp-frame: bugfix in error path

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fbd28841
......@@ -215,8 +215,10 @@ ssize_t send_and_stamp(int sock, void *buf, size_t len, int flags,
while ( (i = recvmsg(sock, &msg, MSG_ERRQUEUE)) < 0 && j--)
usleep(10000); /* retry for 1 second */
if (i < 0) {
memset(tstamp, 0, sizeof(*tstamp));
tstamp->error = ETIMEDOUT;
if (tstamp) {
memset(tstamp, 0, sizeof(*tstamp));
tstamp->error = ETIMEDOUT;
}
return ret;
}
if (getenv("STAMP_VERBOSE")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment