]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: build_initial_monmap: fix mismatched alloc
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 17 Dec 2010 23:31:41 +0000 (15:31 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 17 Dec 2010 23:31:41 +0000 (15:31 -0800)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/mon/MonClient.cc

index 8d9ea06a32c98c900f9e083deb4f766eb82e547d..fc7b15d23b71e374f042c3415276b63cf5b893d2 100644 (file)
@@ -82,7 +82,7 @@ int MonClient::build_initial_monmap()
       char *old_addrs = new char[strlen(g_conf.mon_host)+1];
       strcpy(old_addrs, g_conf.mon_host);
       hosts = mount_resolve_dest(old_addrs);
-      delete old_addrs;
+      delete [] old_addrs;
       bool success = parse_ip_port_vec(hosts, addrs);
       free(hosts);
       if (success) {