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) ...@@ -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++) { for (j = queue->n_signals - nr; j < queue->n_signals; j++) {
queue->signals[j]->siginfo.len = sizeof(siginfo_t); SiginfoEntry *se;
queue->signals[j]->siginfo.data = (void *) (siginfo + j);
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; 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