- remove dead assignments
[oweals/gnunet.git] / src / testbed / testbed_api_operations.c
index 47d135ffd47d09532d5c44a61bd788c6a88b5156..a418de91073f69266cab8643b8a7bcbd2b0dda86 100644 (file)
@@ -470,7 +470,6 @@ decide_capacity (struct OperationQueue *opq,
   rval = GNUNET_YES;
   if (opq->active > opq->max_active)
   {
-    need += opq->active - opq->max_active;
     rval = GNUNET_NO;
     goto ret;
   }
@@ -497,8 +496,12 @@ decide_capacity (struct OperationQueue *opq,
 
  ret:
   GNUNET_free_non_null (evict_entries);  
-  if (NULL != ops_) *ops_ = ops;
-  if (NULL != n_ops_) *n_ops_ = n_ops;
+  if (NULL != ops_)
+    *ops_ = ops;
+  else
+    GNUNET_free (ops);
+  if (NULL != n_ops_)
+    *n_ops_ = n_ops;
   return rval;
 }