From 2ecf540f20e3db8594d3a3fa539d338b27b3a092 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Thu, 26 Feb 2009 11:01:40 +0100 Subject: Fixed some memory leaks changed default paths --- crash-catcher.spec | 13 +++++++++---- src/Daemon/CrashWatcher.cpp | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/crash-catcher.spec b/crash-catcher.spec index c9cd86f8..dcc3decf 100644 --- a/crash-catcher.spec +++ b/crash-catcher.spec @@ -1,7 +1,7 @@ Summary: Automatic bug detection and reporting tool Name: crash-catcher Version: 0.0.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System URL: https://fedorahosted.org/crash-catcher/ @@ -43,6 +43,7 @@ GTK+ wizard for convenient bug reporting. Summary: CrashCatcher's C/C++ addon Group: System Environment/Libraries License: GPLv2+ +Requires: gdb Requires: %{name} = %{version}-%{release} %description addon-ccpp @@ -82,7 +83,6 @@ The simple reporter plugin, which sends a report via mailx to a specified email. %setup -q %build -autoreconf --install --force %configure make @@ -105,8 +105,8 @@ rm -rf $RPM_BUILD_ROOT %preun if [ "$1" = 0 ] ; then - service rarpd stop >/dev/null 2>&1 - /sbin/chkconfig --del rarpd + service crash-catcher stop >/dev/null 2>&1 + /sbin/chkconfig --del crash-catcher fi %postun -p /sbin/ldconfig @@ -152,6 +152,11 @@ fi %{_libdir}/crash-catcher/libMailx.so* %changelog +* Thu Feb 26 2009 Jiri Moskovcak 0.0.1-3 +- spec file cleanups +- changed default paths to crash DB and log DB +- fixed some memory leaks + * Tue Feb 24 2009 Jiri Moskovcak 0.0.1-2 - spec cleanup - added new subpackage gui diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 1cf6e1f0..1e447b0a 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -41,7 +41,8 @@ to_string( T x ) gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointer daemon){ GIOError err; - char buf[INOTIFY_BUFF_SIZE]; + //char *buf = malloc(INOTIFY_BUFF_SIZE; + char *buf = new char[INOTIFY_BUFF_SIZE]; gsize len; int i = 0; err = g_io_channel_read (gio, buf, INOTIFY_BUFF_SIZE, &len); @@ -81,6 +82,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition, } #endif /*DEBUG*/ } + delete[] buf; return TRUE; } -- cgit