Merge lp:~charlesk/indicator-messages/lp-1493534-fix-null-error-dereference into lp:indicator-messages/15.10

Proposed by Charles Kerr on 2015-09-09
Status: Superseded
Proposed branch: lp:~charlesk/indicator-messages/lp-1493534-fix-null-error-dereference
Merge into: lp:indicator-messages/15.10
Diff against target: 17 lines (+6/-2)
1 file modified
src/im-application-list.c (+6/-2)
To merge this branch: bzr merge lp:~charlesk/indicator-messages/lp-1493534-fix-null-error-dereference
Reviewer Review Type Date Requested Status
Pete Woods (community) 2015-09-09 Approve on 2015-09-10
PS Jenkins bot (community) continuous-integration Approve on 2015-09-10
Review via email: mp+270562@code.launchpad.net

This proposal has been superseded by a proposal from 2016-05-16.

Commit message

When parsing the async response of list_sources(), test GError for NULL before dereferencing it

To post a comment you must log in.
449. By Charles Kerr on 2015-09-10

fix typo

Pete Woods (pete-woods) wrote :

Seems a bit convoluted, but okay :)

review: Approve

Unmerged revisions

449. By Charles Kerr on 2015-09-10

fix typo

448. By Charles Kerr on 2015-09-09

test the GError for NULL before dereferencing it

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/im-application-list.c'
2--- src/im-application-list.c 2015-05-05 16:47:39 +0000
3+++ src/im-application-list.c 2015-09-10 13:38:33 +0000
4@@ -1004,8 +1004,12 @@
5 }
6 else
7 {
8- g_warning ("could not fetch the list of sources: %s", error->message);
9- g_error_free (error);
10+ if ((error != NULL) && (error->message != NULL))
11+ g_warning ("could not fetch the list of sources: %s", error->message);
12+ else
13+ g_warning ("could not fetch the list of sources");
14+
15+ g_clear_error (&error);
16 }
17 }
18

Subscribers

People subscribed via source and target branches