Changeset 3b8a563 for functions.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
  • functions.c

    r7865479 r3b8a563  
    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.