Whamcloud - gitweb
Branch b1_8
authorjohann <johann>
Thu, 28 May 2009 11:23:49 +0000 (11:23 +0000)
committerjohann <johann>
Thu, 28 May 2009 11:23:49 +0000 (11:23 +0000)
b=18092
i=adilger
i=johann (patch from Girish)

Fix warnings.

lnet/selftest/console.c

index 943f332..0b19e72 100644 (file)
@@ -1708,8 +1708,8 @@ lstcon_session_new(char *name, int key,
         if (rc != 0) {
                 lstcon_batch_t *bat;
 
-                lstcon_batch_find(LST_DEFAULT_BATCH, &bat);
-                lstcon_batch_destroy(bat);
+                if (lstcon_batch_find(LST_DEFAULT_BATCH, &bat) == 0)
+                        lstcon_batch_destroy(bat);
 
                 return rc;
         }