Fix segfault in defer statement
A defer statement contained an access to a pointer that was set to nil before the deferred statement was run; remove it and just explicity run the statement.
This commit is contained in:
+1
-2
@@ -251,9 +251,8 @@ func (gp *GenericPool) specializePod(metadata *fission.Metadata) (*v1.Pod, error
|
||||
maxRetries := 20
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
resp2, err := http.Post(specializeUrl, "text/plain", bytes.NewReader([]byte{}))
|
||||
defer resp2.Body.Close()
|
||||
|
||||
if err == nil && resp2.StatusCode < 300 {
|
||||
resp2.Body.Close()
|
||||
return pod, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user