From 24af12247551d69798ee5c48d31a0f845d74ecfc Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 10 May 2016 11:19:56 +0200 Subject: [PATCH] bugfix: calloc may fail --- common/utils/T/tracer/gui/xy_plot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/utils/T/tracer/gui/xy_plot.c b/common/utils/T/tracer/gui/xy_plot.c index 4c1a9e1034..f5d5f6bdbd 100644 --- a/common/utils/T/tracer/gui/xy_plot.c +++ b/common/utils/T/tracer/gui/xy_plot.c @@ -259,7 +259,9 @@ void xy_plot_set_points(gui *_gui, widget *_this, int plot, free(this->plots[plot].x); free(this->plots[plot].y); this->plots[plot].x = calloc(npoints, sizeof(float)); + if (this->plots[plot].x == NULL) abort(); this->plots[plot].y = calloc(npoints, sizeof(float)); + if (this->plots[plot].y == NULL) abort(); this->plots[plot].npoints = npoints; }