Changeset 3b8a563 for zcrypt.c


Ignore:
Timestamp:
May 20, 2011, 3:59:31 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
fda61d3
Parents:
7865479
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:12:09)
git-committer:
David Benjamin <davidben@mit.edu> (05/20/11 15:59:31)
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 r3b8a563  
    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.