X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=surf.c;h=2e9c38d2660f3168ae95875c27bcd71b7300b077;hb=637902b452c723e8d5fdb714e8a38861e9c9f64e;hp=c59840455fdb3caeb45c582af00a42a5fd136832;hpb=361da0b3c4bc9f86d4653b026ad16ec4ed5c02c2;p=surf.git diff --git a/surf.c b/surf.c index c598404..2e9c38d 100644 --- a/surf.c +++ b/surf.c @@ -656,7 +656,7 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c) { static void loaduri(Client *c, const Arg *arg) { - char *u, *rp; + char *u = NULL, *rp; const char *uri = (char *)arg->v; Arg a = { .b = FALSE }; struct stat st; @@ -683,9 +683,9 @@ loaduri(Client *c, const Arg *arg) { webkit_web_view_load_uri(c->view, u); c->progress = 0; c->title = copystr(&c->title, u); - g_free(u); updatetitle(c); } + g_free(u); } static void