Skip to content

Commit 86ff5f9

Browse files
committed
Land rapid7#4158, Fix for null dereference on Exploit::Remote::HttpServer#remove_resource
2 parents 8511dc4 + 4e96833 commit 86ff5f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/exploit/http/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def remove_resource(name)
547547
# Guard against removing resources added by other modules
548548
if @my_resources.include?(name)
549549
@my_resources.delete(name)
550-
service.remove_resource(name)
550+
service.remove_resource(name) if service
551551
end
552552
end
553553

0 commit comments

Comments
 (0)