[LIBREPORT PATCH 1/2] rhbz: test rhbz_new_bug() return value for errors
Jakub Filak
jfilak at redhat.com
Tue Jul 2 07:55:52 UTC 2013
Related to rhbz#980228
Signed-off-by: Jakub Filak <jfilak at redhat.com>
---
src/plugins/reporter-bugzilla.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
index d0e04b6..626b41f 100644
--- a/src/plugins/reporter-bugzilla.c
+++ b/src/plugins/reporter-bugzilla.c
@@ -1240,6 +1240,11 @@ int main(int argc, char **argv)
free(bzcomment);
free(summary);
+ if (new_id == -1)
+ {
+ error_msg_and_die(_("Failed to create a new bug."));
+ }
+
log(_("Adding attachments to bug %i"), new_id);
char new_id_str[sizeof(int)*3 + 2];
sprintf(new_id_str, "%i", new_id);
--
1.8.2.1
More information about the Crash-catcher
mailing list