Fixed typo-related memory leak.
authorFredrik Tolf <fredrik@dolda2000.com>
Fri, 17 Oct 2008 23:45:47 +0000 (01:45 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Fri, 17 Oct 2008 23:45:47 +0000 (01:45 +0200)
daemon/fnet-dc.c

index 348a53a..2e490ea 100644 (file)
@@ -872,7 +872,7 @@ static void cmd_hubname(struct socket *sk, struct fnetnode *fn, char *cmd, char
     struct dchub *hub;
     
     hub = fn->data;
-    if(hub->nativename == NULL)
+    if(hub->nativename != NULL)
        free(hub->nativename);
     hub->nativename = sstrdup(args);
     buf = icmbstowcs(args, hub->charset);