Index: /trunk/src/VBox/Main/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/HostImpl.cpp	(revision 31345)
+++ /trunk/src/VBox/Main/HostImpl.cpp	(revision 31346)
@@ -2035,22 +2035,25 @@
                             di_devfs_path_free(pszMinorPath);
 
-                            char *pszSlice = solarisGetSliceFromPath(pszDevLinkPath);
-                            if (   pszSlice && !strcmp(pszSlice, "s2")
-                                && !strncmp(pszDevLinkPath, "/dev/rdsk", sizeof("/dev/rdsk") - 1))   /* We want only raw disks */
+                            if (pszDevLinkPath)
                             {
-                                /*
-                                 * We've got a fully qualified DVD drive. Add it to the list.
-                                 */
-                                PSOLARISDVD pDrive = (PSOLARISDVD)RTMemAllocZ(sizeof(SOLARISDVD));
-                                if (RT_LIKELY(pDrive))
+                                char *pszSlice = solarisGetSliceFromPath(pszDevLinkPath);
+                                if (   pszSlice && !strcmp(pszSlice, "s2")
+                                    && !strncmp(pszDevLinkPath, "/dev/rdsk", sizeof("/dev/rdsk") - 1))   /* We want only raw disks */
                                 {
-                                    RTStrPrintf(pDrive->szDescription, sizeof(pDrive->szDescription), "%s %s", pszVendor, pszProduct);
-                                    RTStrCopy(pDrive->szRawDiskPath, sizeof(pDrive->szRawDiskPath), pszDevLinkPath);
-                                    if (*ppDrives)
-                                        pDrive->pNext = *ppDrives;
-                                    *ppDrives = pDrive;
+                                    /*
+                                     * We've got a fully qualified DVD drive. Add it to the list.
+                                     */
+                                    PSOLARISDVD pDrive = (PSOLARISDVD)RTMemAllocZ(sizeof(SOLARISDVD));
+                                    if (RT_LIKELY(pDrive))
+                                    {
+                                        RTStrPrintf(pDrive->szDescription, sizeof(pDrive->szDescription), "%s %s", pszVendor, pszProduct);
+                                        RTStrCopy(pDrive->szRawDiskPath, sizeof(pDrive->szRawDiskPath), pszDevLinkPath);
+                                        if (*ppDrives)
+                                            pDrive->pNext = *ppDrives;
+                                        *ppDrives = pDrive;
+                                    }
                                 }
+                                free(pszDevLinkPath);
                             }
-                            free(pszDevLinkPath);
                         }
                     }
