Skip to content
Snippets Groups Projects
Commit 28187956 authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

tools/stamp-frame: bugfix in error path


Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent fbd28841
Branches
Tags
No related merge requests found
......@@ -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")) {
......
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