- Fix memory leak
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Tue, 22 Sep 2009 20:09:11 +0000 (20:09 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Tue, 22 Sep 2009 20:09:11 +0000 (20:09 +0000)
- Fix displaying of random characters if there is no device name

svn path=/trunk/; revision=43116

reactos/dll/win32/netshell/shfldr_netconnect.c

index 4c60227..273c3ed 100644 (file)
@@ -644,6 +644,11 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface,
                 psd->str.uType = STRRET_WSTR;
                 hr = SHStrDupW(buffer, &psd->str.u.pOleStr);
             }
+            else
+            {
+                psd->str.u.cStr[0] = '\0';
+                psd->str.uType = STRRET_CSTR;
+            }
             break;
         case COLUMN_PHONE:
         case COLUMN_OWNER:
@@ -651,9 +656,8 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface,
             psd->str.uType = STRRET_CSTR;
             break;
     }
-#if 0
+
     NcFreeNetconProperties(pProperties);
-#endif
     return hr;
 }