Fix null deref in error code path. Found by the
[metze/old/v3-2-winbind-ndr.git] / source / registry / reg_objects.c
index 2a898f017054bba45bf9baab134a7e51a9501c35..1bd3ac9bd91395eb57ca5bd4cc52da71a43629ad 100644 (file)
@@ -182,6 +182,7 @@ REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val )
                        DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n",
                                val->size));
                        SAFE_FREE( copy );
+                       return NULL;
                }
                copy->size = val->size;
        }