Commit 2c7ac136 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

services: Handle realloc failures better (Coverity).

parent 45a12690
...@@ -242,10 +242,12 @@ static void scmdatabase_autostart_services(struct scmdatabase *db) ...@@ -242,10 +242,12 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
{ {
if (i+1 >= size) if (i+1 >= size)
{ {
struct service_entry **slist_new;
size *= 2; size *= 2;
services_list = HeapReAlloc(GetProcessHeap(), 0, services_list, size * sizeof(services_list[0])); slist_new = HeapReAlloc(GetProcessHeap(), 0, services_list, size * sizeof(services_list[0]));
if (!services_list) if (!slist_new)
break; break;
services_list = slist_new;
} }
services_list[i] = service; services_list[i] = service;
service->ref_count++; service->ref_count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment