Skip to content

Commit

Permalink
Update source/common.c
Browse files Browse the repository at this point in the history
PR trivial merge

Co-authored-by: Michael Graeb <[email protected]>
  • Loading branch information
JonathanHenson and graebm authored Oct 10, 2023
1 parent 9b972c3 commit 9aa70b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ PyObject *aws_py_load_system_environment(PyObject *self, PyObject *args) {
}

PyObject *capsule = PyCapsule_New(env, s_capsule_name_sys_env, s_sys_env_destructor);

if (capsule == NULL) {
aws_system_environment_destroy(env);
return PyErr_AwsLastError();
return NULL;
}

return capsule;
Expand Down

0 comments on commit 9aa70b7

Please sign in to comment.