summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-02-26 11:01:40 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-02-26 11:01:40 +0100
commit2ecf540f20e3db8594d3a3fa539d338b27b3a092 (patch)
tree9812fcd7af38386922eea51ca19ab0f71c2b6913
parent48e84b9a5b82125276622110349c5291a14e7ba3 (diff)
downloadabrt-2ecf540f20e3db8594d3a3fa539d338b27b3a092.tar.gz
abrt-2ecf540f20e3db8594d3a3fa539d338b27b3a092.tar.xz
abrt-2ecf540f20e3db8594d3a3fa539d338b27b3a092.zip
Fixed some memory leaks
changed default paths
-rw-r--r--crash-catcher.spec13
-rw-r--r--src/Daemon/CrashWatcher.cpp4
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 <jmoskovc@redhat.com> 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 <jmoskovc@redhat.com> 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;
}