Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2014-08-19 15:12:10 +0400
committerPavel Emelyanov <xemul@parallels.com>2014-08-19 15:25:57 +0400
commit92664c52200ef078cdabfd05ae1c0f8175c21bb5 (patch)
tree8d2be15a5cd0dd2562cacf69b49cad931dd719aa
parent8197bae072f537f21a965b29bfd5fabb1875677e (diff)
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: Pavel Emelyanov <xemul@parallels.com>
-rw-r--r--cr-dump.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/cr-dump.c b/cr-dump.c
index a660c14c7..baedc98c2 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -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;
}