]> granicus.if.org Git - python/commitdiff
otherset is known to be non-NULL based on checks before and DECREF after.
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 17 Jul 2006 00:57:15 +0000 (00:57 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 17 Jul 2006 00:57:15 +0000 (00:57 +0000)
DECREF otherset rather than XDECREF in error conditions too.

Reported by Klockwork #154.

Objects/setobject.c

index f10fdd795f245d5a6fc512cb5a06dee1009e2e95..3ddb6754753acb67e6dd4651f841caaa4f52bd6a 100644 (file)
@@ -1380,12 +1380,12 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other)
        while (set_next(otherset, &pos, &entry)) {
                int rv = set_discard_entry(so, entry);
                if (rv == -1) {
-                       Py_XDECREF(otherset);
+                       Py_DECREF(otherset);
                        return NULL;
                }
                if (rv == DISCARD_NOTFOUND) {
                        if (set_add_entry(so, entry) == -1) {
-                               Py_XDECREF(otherset);
+                               Py_DECREF(otherset);
                                return NULL;
                        }
                }