Commit 92664c52 authored by Pavel Emelyanov's avatar Pavel Emelyanov

signals: Don't forget to allocate SiginfoEntry

The se variable is just an array of pointers on these
objects. Need to allocate the objects themselves.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8197bae0
......@@ -1202,10 +1202,23 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
}
for (j = queue->n_signals - nr; j < queue->n_signals; j++) {
queue->signals[j]->siginfo.len = sizeof(siginfo_t);
queue->signals[j]->siginfo.data = (void *) (siginfo + j);
SiginfoEntry *se;
se = xmalloc(sizeof(*se));
if (!se) {
ret = -1;
break;
}
siginfo_entry__init(se);
se->siginfo.len = sizeof(siginfo_t);
se->siginfo.data = (void *) (siginfo + j);
queue->signals[j] = se;
}
if (ret < 0)
break;
arg.off += nr;
}
......
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