Changeset 55b2de8 for zcrypt.c


Ignore:
Timestamp:
May 12, 2011, 4:39:26 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
7fd0bf7
Parents:
13ee8f2
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:12:09)
git-committer:
David Benjamin <davidben@mit.edu> (05/12/11 16:39:26)
Message:
Remove NULL checks before calling g_free

g_free handles the NULL check for us.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zcrypt.c

    r1dd285b r55b2de8  
    476476
    477477  for(i = 0; i < MAX_SEARCH; i++) {
    478     if(varname[i] != NULL) {
    479       g_free(varname[i]);
    480     }
    481   }
    482 
    483   if(filename != NULL) {
    484     g_free(filename);
    485   }
     478    g_free(varname[i]);
     479  }
     480
     481  g_free(filename);
    486482
    487483  return keyfile;
     
    773769  err = call_filter("gpg", argv, in, &out, &status);
    774770  if(err || status) {
    775     if(out) g_free(out);
     771    g_free(out);
    776772    return FALSE;
    777773  }
     
    856852  err = call_filter("gpg", argv, in, &out, &status);
    857853  if(err || status) {
    858     if(out) g_free(out);
     854    g_free(out);
    859855    return FALSE;
    860856  }
Note: See TracChangeset for help on using the changeset viewer.