summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 97f4d17..2e1a097 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -392,16 +392,10 @@ remove_unusable_flags(PyObject *m)
break;
}
else {
- PyObject *flag_name = PyUnicode_FromString(win_runtime_flags[i].flag_name);
- if (flag_name == NULL) {
+ if (PyDict_PopString(dict, win_runtime_flags[i].flag_name,
+ NULL) < 0) {
return -1;
}
- PyObject *v = _PyDict_Pop(dict, flag_name, Py_None);
- Py_DECREF(flag_name);
- if (v == NULL) {
- return -1;
- }
- Py_DECREF(v);
}
}
return 0;