Changeset 55b2de8 for functions.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
  • functions.c

    r7b4f3be r55b2de8  
    3232  char *rv;
    3333  rv=owl_function_command(cmdbuff);
    34   if (rv) g_free(rv);
     34  g_free(rv);
    3535}
    3636
     
    453453
    454454  if (rv || status) {
    455     if(cryptmsg) g_free(cryptmsg);
     455    g_free(cryptmsg);
    456456    g_free(old_msg);
    457457    owl_function_error("Error in zcrypt, possibly no key found.  Message not sent.");
     
    991991  /* execute the commands in shutdown */
    992992  ret = owl_perlconfig_execute("BarnOwl::Hooks::_shutdown();");
    993   if (ret) g_free(ret);
     993  g_free(ret);
    994994
    995995  /* signal our child process, if any */
     
    23582358done:
    23592359  g_free(class);
    2360   if (instance) {
    2361     g_free(instance);
    2362   }
     2360  g_free(instance);
    23632361  return(filtname);
    23642362}
Note: See TracChangeset for help on using the changeset viewer.