diff --git a/src/lib/plot.c b/src/lib/plot.c index e8f3a4068..94996c947 100644 --- a/src/lib/plot.c +++ b/src/lib/plot.c @@ -422,6 +422,7 @@ ncuplot* ncuplot_create(ncplane* n, const ncplot_options* opts, uint64_t miny, u return ret; } free(ret); + ret = NULL; } return ret; } @@ -453,6 +454,7 @@ ncdplot* ncdplot_create(ncplane* n, const ncplot_options* opts, double miny, dou return ret; } free(ret); + ret = NULL; } return ret; }