diff options
Diffstat (limited to 'api/license.go')
-rw-r--r-- | api/license.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/license.go b/api/license.go index 06d4aa3a7..a6a167cac 100644 --- a/api/license.go +++ b/api/license.go @@ -45,11 +45,11 @@ func addLicense(c *Context, w http.ResponseWriter, r *http.Request) { fileData := fileArray[0] file, err := fileData.Open() - defer file.Close() if err != nil { c.Err = model.NewAppError("addLicense", "api.license.add_license.open.app_error", nil, err.Error(), http.StatusInternalServerError) return } + defer file.Close() buf := bytes.NewBuffer(nil) io.Copy(buf, file) |