* ceval.c: ifdef out the last argument passing compat hack.

* Fixed memory leaks in socket, select and sv modules: mkvalue("O", v)
  does INCREF(v) so if v is brand new it should be XDECREF'd
This commit is contained in:
Guido van Rossum 1993-02-05 09:46:15 +00:00
parent 995c33a2bb
commit 6f5afc9a73
4 changed files with 37 additions and 29 deletions

View file

@ -126,7 +126,7 @@ svc_GetFields(self, args)
captureobject *self;
object *args;
{
object *f1, *f2;
object *f1, *f2, *ret;
int fieldsize;
if (self->ob_info.format != SV_RGB8_FRAMES) {
@ -136,14 +136,11 @@ svc_GetFields(self, args)
fieldsize = self->ob_info.width * self->ob_info.height / 2;
f1 = newsizedstringobject((char *) self->ob_capture, fieldsize);
if (f1 == NULL)
return NULL;
f2 = newsizedstringobject((char *) self->ob_capture + fieldsize, fieldsize);
if (f2 == NULL) {
DECREF(f1);
return NULL;
}
return mkvalue("(OO)", f1, f2);
ret = mkvalue("(OO)", f1, f2);
XDECREF(f1);
XDECREF(f2);
return ret;
}
static object *