about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-19 06:43:34 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-19 06:43:34 +0000
commit72e6cdfa2cd95240439c72705ab28a2eebb7d04e (patch)
treeae830b7817948dc795cc92ec98216c478dde57e3 /sunrpc
parent354b75277bc86768eafbbf5f590deb27e0a71d89 (diff)
downloadglibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.gz
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.xz
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.zip
Remove useless "if" before "free".
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/xdr_sizeof.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sunrpc/xdr_sizeof.c b/sunrpc/xdr_sizeof.c
index aaf25e9699..dc3e19ebe3 100644
--- a/sunrpc/xdr_sizeof.c
+++ b/sunrpc/xdr_sizeof.c
@@ -86,8 +86,7 @@ x_inline (XDR *xdrs, u_int len)
   else
     {
       /* Free the earlier space and allocate new area */
-      if (xdrs->x_private)
-	free (xdrs->x_private);
+      free (xdrs->x_private);
       if ((xdrs->x_private = (caddr_t) malloc (len)) == NULL)
 	{
 	  xdrs->x_base = 0;
@@ -157,7 +156,6 @@ xdr_sizeof (xdrproc_t func, void *data)
   x.x_base = (caddr_t) 0;
 
   stat = func (&x, data);
-  if (x.x_private)
-    free (x.x_private);
+  free (x.x_private);
   return stat == TRUE ? x.x_handy : 0;
 }