Plug some leaks

Change-Id: I4268ea32cfb0ebd6ce5711e30865750dffa94e92
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp
index e1db680..2fe249d 100644
--- a/server/BandwidthController.cpp
+++ b/server/BandwidthController.cpp
@@ -1100,12 +1100,12 @@
         return -1;
     }
 
-    asprintf(&alertName, "%sAlert", costName);
     if (!*alertBytes) {
         ALOGE("No prior alert set for %s alert", costName);
         return -1;
     }
 
+    asprintf(&alertName, "%sAlert", costName);
     asprintf(&chainName, "bw_costly_%s", costName);
     asprintf(&alertQuotaCmd, ALERT_IPT_TEMPLATE, "-D", chainName, *alertBytes, alertName);
     res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd);