aboutsummaryrefslogtreecommitdiff
path: root/src/ats/perf_ats_solver.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-05 22:23:05 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-05 22:23:05 +0000
commit92e2a8bab3b941b6da6c33e6cfe9d6d5b6543ec9 (patch)
treebdf40e0a7254a9b4233290f817bb63f044bf76c5 /src/ats/perf_ats_solver.c
parent9fdedf1583af6493b9a6b073184f2a4cb31fe0f3 (diff)
downloadgnunet-92e2a8bab3b941b6da6c33e6cfe9d6d5b6543ec9.tar.gz
gnunet-92e2a8bab3b941b6da6c33e6cfe9d6d5b6543ec9.zip
-fix leak (rather theoretical one)
Diffstat (limited to 'src/ats/perf_ats_solver.c')
-rw-r--r--src/ats/perf_ats_solver.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c
index beb30175d..0cfc72c69 100644
--- a/src/ats/perf_ats_solver.c
+++ b/src/ats/perf_ats_solver.c
@@ -655,21 +655,27 @@ write_gnuplot_script (char * data_fn, int full)
655 } 655 }
656 else if (MODE_RIL == ph.ats_mode) 656 else if (MODE_RIL == ph.ats_mode)
657 { 657 {
658 GNUNET_asprintf (&data, "plot '%s' using 1:%u with lines title 'Total time to solve'\n" \ 658 GNUNET_asprintf (&data,
659 "pause -1", 659 "plot '%s' using 1:%u with lines title 'Total time to solve'\n" \
660 data_fn, 3); 660 "pause -1",
661 data_fn, 3);
661 } 662 }
662 663
663 if ((NULL != data) && (GNUNET_SYSERR == GNUNET_DISK_file_write(f, data, strlen(data)))) 664 if ((NULL != data) &&
664 { 665 (GNUNET_SYSERR == GNUNET_DISK_file_write (f, data, strlen(data))))
665 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot write data to plot file `%s'\n", gfn); 666 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
666 GNUNET_free (data); 667 "Cannot write data to plot file `%s'\n",
667 } 668 gfn);
669 GNUNET_free_non_null (data);
668 670
669 if (GNUNET_SYSERR == GNUNET_DISK_file_close(f)) 671 if (GNUNET_SYSERR == GNUNET_DISK_file_close(f))
670 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close gnuplot file `%s'\n", gfn); 672 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
673 "Cannot close gnuplot file `%s'\n",
674 gfn);
671 else 675 else
672 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Data successfully written to plot file `%s'\n", gfn); 676 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
677 "Data successfully written to plot file `%s'\n",
678 gfn);
673 GNUNET_free (gfn); 679 GNUNET_free (gfn);
674 680
675} 681}