X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/735a4294762b784c878bc249f591be8fd154c237..0c33d3a6483e2493a29d662afc79a8c86dc6dfc5:/windows/winjump.c diff --git a/windows/winjump.c b/windows/winjump.c index 4e69dd74..abefe445 100644 --- a/windows/winjump.c +++ b/windows/winjump.c @@ -410,16 +410,20 @@ static IShellLink *make_shell_link(const char *appname, /* Check if this is a valid session, otherwise don't add. */ if (sessionname) { psettings_tmp = open_settings_r(sessionname); - if (!psettings_tmp) + if (!psettings_tmp) { + sfree(app_path); return NULL; + } close_settings_r(psettings_tmp); } /* Create the new item. */ if (!SUCCEEDED(CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - COMPTR(IShellLink, &ret)))) + COMPTR(IShellLink, &ret)))) { + sfree(app_path); return NULL; + } /* Set path, parameters, icon and description. */ ret->lpVtbl->SetPath(ret, app_path); @@ -663,11 +667,9 @@ static void update_jumplist_from_registry(void) } /* Clears the entire jumplist. */ -static void clear_jumplist(void) +void clear_jumplist(void) { ICustomDestinationList *pCDL; - UINT num_items; - IObjectArray *pRemoved; if (CoCreateInstance(&CLSID_DestinationList, NULL, CLSCTX_INPROC_SERVER, COMPTR(ICustomDestinationList, &pCDL)) == S_OK) {