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

Proposed by Charles Kerr
Status: Approved
Approved by: Antti Kaijanmäki
Approved revision: 449
Proposed branch: lp:~charlesk/indicator-messages/lp-1493534-fix-null-error-dereference
Merge into: lp:indicator-messages
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
PS Jenkins bot (community) continuous-integration Approve
Antti Kaijanmäki (community) Approve
Pete Woods Pending
Review via email: mp+294846@code.launchpad.net

This proposal supersedes a proposal from 2015-09-09.

Commit message

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

Description of the change

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

This should've landed awhile back. Queuing it up now for spring cleaning.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Pete Woods (pete-woods) wrote : Posted in a previous version of this proposal

Seems a bit convoluted, but okay :)

review: Approve
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

lgtm.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

449. By Charles Kerr

fix typo

448. By Charles Kerr

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 2016-05-16 21:41:57 +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