ref counting bug in orb.c



Hi all,

ORB_init() doesn't refcount properly after the first time it's called,
which means if somebody does:

  orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", &ev);
  CORBA_Object_release((CORBA_Object)orb, &ev);
  orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", &ev);
  CORBA_Object_release((CORBA_Object)orb, &ev);
  orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", &ev);
  CORBA_Object_release((CORBA_Object)orb, &ev);
  orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", &ev);

they get a segfault.

I've attached a patch which fixes this. I'll commit it to CVS in a
couple of days if nobody objects.

Cheers,

Phil

Attachment: ORBit-0.5-stable-orb-refcounting.patch
Description: orb ref counting patch



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]