Merge lp:~cyphermox/indicator-appmenu/lp1112844 into lp:indicator-appmenu/13.04

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Charles Kerr
Approved revision: 232
Merged at revision: 231
Proposed branch: lp:~cyphermox/indicator-appmenu/lp1112844
Merge into: lp:indicator-appmenu/13.04
Diff against target: 16 lines (+6/-1)
1 file modified
src/usage-tracker.c (+6/-1)
To merge this branch: bzr merge lp:~cyphermox/indicator-appmenu/lp1112844
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Indicator Applet Developers Pending
Review via email: mp+146741@code.launchpad.net

Commit message

Fix Coverity CHECKED_RETURN - CID 11391: unchecked return value of g_mkdir().

Description of the change

Fix Coverity CHECKED_RETURN - CID 11391: unchecked return value of g_mkdir().

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Needs to free cachedir...

232. By Mathieu Trudel-Lapierre

Add missing g_free() for cachedir on early exit

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/usage-tracker.c'
2--- src/usage-tracker.c 2012-03-12 16:15:18 +0000
3+++ src/usage-tracker.c 2013-02-06 15:27:20 +0000
4@@ -211,7 +211,12 @@
5
6 gchar * cachedir = g_build_filename(basecachedir, "indicator-appmenu", NULL);
7 if (!g_file_test(cachedir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
8- g_mkdir(cachedir, 1 << 6 | 1 << 7 | 1 << 8); // 700
9+ if (g_mkdir(cachedir, 00700) != 0) {
10+ g_warning("Could not create cache directory, LRU DB can't be created");
11+ self->priv->db = NULL;
12+ g_free(cachedir);
13+ return;
14+ }
15 }
16 g_free(cachedir);
17

Subscribers

People subscribed via source and target branches