Miroslav Lichvar mlichvar@redhat.com writes:
On Wed, Apr 27, 2011 at 03:26:46PM +0200, Nikola Pajkovsky wrote:
Miroslav Lichvar mlichvar@redhat.com writes:
src/cli/report.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cli/report.c b/src/cli/report.c index a3dd18a..e99ea34 100644 --- a/src/cli/report.c +++ b/src/cli/report.c @@ -586,7 +586,7 @@ char *select_event_option(GList *list_options)
unsigned count = g_list_length(list_options) - 1;
This need to be fixed. We must not subtract -1 right now.
That's addressed in the 3/3 patch.
ok
if (!count)
return NULL;
return xstrdup((char*)list_options->data);
g_list_length returns 0 only if list_options is NULL and we check it before.
If there is only one reporter, I think we want to select it without asking the user, or not?
Problem is in function report. see
... char *event = select_event_option(list_analyze_events); list_free_with_free(list_analyze_events);
int analyzer_result = run_analyze_event(dump_dir_name, event); if NULL it sigsegv ^^^ free(event);
...
Need to be checked before
... char *event = select_event_option(list_analyze_events); list_free_with_free(list_analyze_events);
int analyzer_result; if (event) analyzer_result = run_analyze_event(dump_dir_name, event); free(event);
...
int pos = -1; fprintf(stdout, _("Select how you would like to analyze the problem:\n"));
Agreed, but that should be another patch.
nope, this patch fix only one part of problem, so why not fix the other one?