From 6be9ae2ce97d602811d4ccc07a2f0b42142ff5b0 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 22 Feb 2003 21:57:03 +0000 Subject: [PATCH] a patch to avoid a memory leak and a Makefile.am patch to distribute all required source files -- Peter Stamfest git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@186 a5681a0c-68f1-0310-ab6d-d61299d08faa --- doc/Makefile.am | 3 ++- src/Makefile.am | 3 ++- src/rrd_error.c | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 3022e64..261e8c7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -14,7 +14,8 @@ SRC = rrdgraph.src rrdgraph_examples.src rrdgraph_rpn.src \ POD = rrdtool.pod rrdlast.pod rrdcreate.pod rrdupdate.pod rrdtutorial.es.pod \ cdeftutorial.pod rpntutorial.pod rrdgraph-old.pod bin_dec_hex.pod \ rrdfetch.pod rrdrestore.pod rrddump.pod rrdtune.pod rrdresize.pod \ - rrdxport.pod rrdcgi.pod rrdtutorial.pod rrdinfo.pod $(SRC:.src=.pod) + rrdxport.pod rrdcgi.pod rrdtutorial.pod rrdinfo.pod rrdthreads.pod \ + $(SRC:.src=.pod) PMP = RRDs.pm RRDp.pm diff --git a/src/Makefile.am b/src/Makefile.am index 4a93f32..75a29d5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -69,7 +69,8 @@ RRD_C_FILES = \ getopt.h ntconfig.h parsetime.h \ rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_hw.h rrd_rpncalc.h \ rrd_tool.c \ - rrd_nan_inf.h fnv.h rrd_graph.h rrd_afm.h rrd_afm_data.h + rrd_nan_inf.h fnv.h rrd_graph.h rrd_afm.h rrd_afm_data.h \ + rrd_is_thread_safe.h # Build two libraries. One is a public one that gets installed in # $prefix/lib. Libtool does not create an archive of the PIC compiled diff --git a/src/rrd_error.c b/src/rrd_error.c index 33d7c2f..4b1b96f 100644 --- a/src/rrd_error.c +++ b/src/rrd_error.c @@ -5,6 +5,10 @@ ***************************************************************************** * $Id$ * $Log$ + * Revision 1.4 2003/02/22 21:57:03 oetiker + * a patch to avoid a memory leak and a Makefile.am patch to + * distribute all required source files -- Peter Stamfest + * * Revision 1.3 2003/02/13 07:05:27 oetiker * Find attached the patch I promised to send to you. Please note that there * are three new source files (src/rrd_is_thread_safe.h, src/rrd_thread_safe.c @@ -127,6 +131,7 @@ void rrd_free_context(struct rrd_context *rrd_ctx) { if (rrd_ctx) { if (rrd_ctx->rrd_error) free(rrd_ctx->rrd_error); + if (rrd_ctx->lib_errstr) free(rrd_ctx->lib_errstr); free(rrd_ctx); } } -- 2.11.0