Whamcloud - gitweb
LU-4629 utils: fix rsources leak
[fs/lustre-release.git] / lustre / utils / obdbarrier.c
index 5e27fb6..9f0af2e 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +24,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -212,8 +210,10 @@ main (int argc, char **argv)
                 return (1);
 
         b = obdio_new_barrier (oid, bid, npeers);
-        if (b == NULL)
-                return (1);
+       if (b == NULL) {
+               rc = 1;
+               goto out;
+       }
 
         rc = 0;
         if (setup) {
@@ -232,7 +232,7 @@ main (int argc, char **argv)
         }
 
         free(b);
-
+out:
         obdio_disconnect(conn, 0);
 
         return (rc == 0 ? 0 : 1);