Hi,
Please find the latest report on new defect(s) introduced to Apache-Qpid found
with Coverity Scan
Defect(s) Reported-by: Coverity Scan
** CID 1063266: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 14138
** CID 1063265: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13586
** CID 1063264: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 8559
** CID 1063263: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 8050
** CID 1063262: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7872
** CID 1063261: Logically dead code (DEADCODE)
/bindings/qpid/perl/perlPERL_wrap.cxx: 5082
________________________________________________________________________
CID 1063266: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13993 ( alloc_fn)
13990 }
13991 arg1 = reinterpret_cast< qpid::messaging::Message * >(argp1);
13992 {
>>> Storage is returned from allocation function "operator new(size_t)".
13993 arg2 = new qpid::types::Variant(PyToVariant(obj1));
13994 }
13995 {
13996 PyObject * pExceptionType = NULL;
13997 std::string error;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13993 ( var_assign)
13990 }
13991 arg1 = reinterpret_cast< qpid::messaging::Message * >(argp1);
13992 {
>>> Assigning: "arg2" = storage returned from "new
>>> qpid::types::Variant(PyToVariant(obj1))".
13993 arg2 = new qpid::types::Variant(PyToVariant(obj1));
13994 }
13995 {
13996 PyObject * pExceptionType = NULL;
13997 std::string error;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 14000 ( noescape)
13997 std::string error;
13998 Py_BEGIN_ALLOW_THREADS;
13999 try {
>>> Resource "(qpid::types::Variant const *)arg2" is not freed or pointed-to in
>>> function "qpid::messaging::Message::setContentObject(qpid::types::Variant
>>> const &)".
14000 (arg1)->setContentObject((qpid::types::Variant const &)*arg2);
14001 }
14002 /* Catch and translate exceptions. */
14003 /*@SWIG:TRANSLATE_EXCEPTION@*/
14004 catch ( qpid::messaging::NoMessageAvailable & ex) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 14138 ( leaked_storage)
14135 Py_END_ALLOW_THREADS;
14136 if (!error.empty()) {
14137 PyErr_SetString(pExceptionType, error.c_str());
>>> CID 1063266: Resource leak (RESOURCE_LEAK)
>>> Variable "arg2" going out of scope leaks the storage it points to.
14138 return NULL;
14139 }
14140 }
14141 resultobj = SWIG_Py_Void();
14142 {
________________________________________________________________________
CID 1063265: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13434 ( alloc_arg)
13431 arg1 = reinterpret_cast< qpid::messaging::Message * >(argp1);
13432 {
13433 std::string *ptr = (std::string *)0;
>>> "SWIG_AsPtr_std_string(PyObject *, std::string **)" allocates memory that
>>> is stored into "ptr".
13434 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
13435 if (!SWIG_IsOK(res2)) {
13436 SWIG_exception_fail(SWIG_ArgError(res2), "in method '"
"Message_setContentBytes" "', argument " "2"" of type '" "std::string const
&""'");
13437 }
13438 if (!ptr) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13441 ( var_assign)
13438 if (!ptr) {
13439 SWIG_exception_fail(SWIG_ValueError, "invalid null reference
" "in method '" "Message_setContentBytes" "', argument " "2"" of type '"
"std::string const &""'");
13440 }
>>> Assigning: "arg2" = "ptr".
13441 arg2 = ptr;
13442 }
13443 {
13444 PyObject * pExceptionType = NULL;
13445 std::string error;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13442 ( leaked_storage)
13439 SWIG_exception_fail(SWIG_ValueError, "invalid null reference
" "in method '" "Message_setContentBytes" "', argument " "2"" of type '"
"std::string const &""'");
13440 }
13441 arg2 = ptr;
>>> Variable "ptr" going out of scope leaks the storage it points to.
13442 }
13443 {
13444 PyObject * pExceptionType = NULL;
13445 std::string error;
13446 Py_BEGIN_ALLOW_THREADS;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13448 ( noescape)
13445 std::string error;
13446 Py_BEGIN_ALLOW_THREADS;
13447 try {
>>> Resource "(std::string const *)arg2" is not freed or pointed-to in function
>>> "qpid::messaging::Message::setContentBytes(std::string const &)".
13448 (arg1)->setContentBytes((std::string const &)*arg2);
13449 }
13450 /* Catch and translate exceptions. */
13451 /*@SWIG:TRANSLATE_EXCEPTION@*/
13452 catch ( qpid::messaging::NoMessageAvailable & ex) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 13586 ( leaked_storage)
13583 Py_END_ALLOW_THREADS;
13584 if (!error.empty()) {
13585 PyErr_SetString(pExceptionType, error.c_str());
>>> CID 1063265: Resource leak (RESOURCE_LEAK)
>>> Variable "arg2" going out of scope leaks the storage it points to.
13586 return NULL;
13587 }
13588 }
13589 resultobj = SWIG_Py_Void();
13590 if (SWIG_IsNewObj(res2)) delete arg2;
________________________________________________________________________
CID 1063264: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 8421 ( alloc_fn)
8418 std::string error;
8419 Py_BEGIN_ALLOW_THREADS;
8420 try {
>>> Storage is returned from allocation function "operator new(size_t)".
8421 result = (qpid::messaging::Message *)new
qpid::messaging::Message((qpid::messaging::Message const &)*arg1);
8422 }
8423 /* Catch and translate exceptions. */
8424 /*@SWIG:TRANSLATE_EXCEPTION@*/
8425 catch ( qpid::messaging::NoMessageAvailable & ex) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 8421 ( var_assign)
8418 std::string error;
8419 Py_BEGIN_ALLOW_THREADS;
8420 try {
>>> Assigning: "result" = storage returned from "new
>>> qpid::messaging::Message((qpid::messaging::Message const *)arg1)".
8421 result = (qpid::messaging::Message *)new
qpid::messaging::Message((qpid::messaging::Message const &)*arg1);
8422 }
8423 /* Catch and translate exceptions. */
8424 /*@SWIG:TRANSLATE_EXCEPTION@*/
8425 catch ( qpid::messaging::NoMessageAvailable & ex) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 8559 ( leaked_storage)
8556 Py_END_ALLOW_THREADS;
8557 if (!error.empty()) {
8558 PyErr_SetString(pExceptionType, error.c_str());
>>> CID 1063264: Resource leak (RESOURCE_LEAK)
>>> Variable "result" going out of scope leaks the storage it points to.
8559 return NULL;
8560 }
8561 }
8562 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result),
SWIGTYPE_p_qpid__messaging__Message, SWIG_POINTER_NEW | 0 );
8563 return resultobj;
________________________________________________________________________
CID 1063263: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7898 ( alloc_arg)
7895 if (!PyArg_ParseTuple(args,(char *)"O:new_Message",&obj0))
SWIG_fail;
7896 {
7897 std::string *ptr = (std::string *)0;
>>> "SWIG_AsPtr_std_string(PyObject *, std::string **)" allocates memory that
>>> is stored into "ptr".
7898 res1 = SWIG_AsPtr_std_string(obj0, &ptr);
7899 if (!SWIG_IsOK(res1)) {
7900 SWIG_exception_fail(SWIG_ArgError(res1), "in method '"
"new_Message" "', argument " "1"" of type '" "std::string const &""'");
7901 }
7902 if (!ptr) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7905 ( var_assign)
7902 if (!ptr) {
7903 SWIG_exception_fail(SWIG_ValueError, "invalid null reference "
"in method '" "new_Message" "', argument " "1"" of type '" "std::string const
&""'");
7904 }
>>> Assigning: "arg1" = "ptr".
7905 arg1 = ptr;
7906 }
7907 {
7908 PyObject * pExceptionType = NULL;
7909 std::string error;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7906 ( leaked_storage)
7903 SWIG_exception_fail(SWIG_ValueError, "invalid null reference "
"in method '" "new_Message" "', argument " "1"" of type '" "std::string const
&""'");
7904 }
7905 arg1 = ptr;
>>> Variable "ptr" going out of scope leaks the storage it points to.
7906 }
7907 {
7908 PyObject * pExceptionType = NULL;
7909 std::string error;
7910 Py_BEGIN_ALLOW_THREADS;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7912 ( noescape)
7909 std::string error;
7910 Py_BEGIN_ALLOW_THREADS;
7911 try {
>>> Resource "(std::string const *)arg1" is not freed or pointed-to in function
>>> "qpid::messaging::Message::Message(std::string const &)".
7912 result = (qpid::messaging::Message *)new
qpid::messaging::Message((std::string const &)*arg1);
7913 }
7914 /* Catch and translate exceptions. */
7915 /*@SWIG:TRANSLATE_EXCEPTION@*/
7916 catch ( qpid::messaging::NoMessageAvailable & ex) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 8050 ( leaked_storage)
8047 Py_END_ALLOW_THREADS;
8048 if (!error.empty()) {
8049 PyErr_SetString(pExceptionType, error.c_str());
>>> CID 1063263: Resource leak (RESOURCE_LEAK)
>>> Variable "arg1" going out of scope leaks the storage it points to.
8050 return NULL;
8051 }
8052 }
8053 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result),
SWIGTYPE_p_qpid__messaging__Message, SWIG_POINTER_NEW | 0 );
8054 if (SWIG_IsNewObj(res1)) delete arg1;
________________________________________________________________________
CID 1063262: Resource leak (RESOURCE_LEAK)
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7727 ( alloc_fn)
7724
7725 if (!PyArg_ParseTuple(args,(char *)"O:new_Message",&obj0))
SWIG_fail;
7726 {
>>> Storage is returned from allocation function "operator new(size_t)".
7727 arg1 = new qpid::types::Variant(PyToVariant(obj0));
7728 }
7729 {
7730 PyObject * pExceptionType = NULL;
7731 std::string error;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7727 ( var_assign)
7724
7725 if (!PyArg_ParseTuple(args,(char *)"O:new_Message",&obj0))
SWIG_fail;
7726 {
>>> Assigning: "arg1" = storage returned from "new
>>> qpid::types::Variant(PyToVariant(obj0))".
7727 arg1 = new qpid::types::Variant(PyToVariant(obj0));
7728 }
7729 {
7730 PyObject * pExceptionType = NULL;
7731 std::string error;
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7734 ( noescape)
7731 std::string error;
7732 Py_BEGIN_ALLOW_THREADS;
7733 try {
>>> Resource "arg1" is not freed or pointed-to in function
>>> "qpid::messaging::Message::Message(qpid::types::Variant &)".
7734 result = (qpid::messaging::Message *)new
qpid::messaging::Message(*arg1);
7735 }
7736 /* Catch and translate exceptions. */
7737 /*@SWIG:TRANSLATE_EXCEPTION@*/
7738 catch ( qpid::messaging::NoMessageAvailable & ex) {
/bindings/qpid/python/pythonPYTHON_wrap.cxx: 7872 ( leaked_storage)
7869 Py_END_ALLOW_THREADS;
7870 if (!error.empty()) {
7871 PyErr_SetString(pExceptionType, error.c_str());
>>> CID 1063262: Resource leak (RESOURCE_LEAK)
>>> Variable "arg1" going out of scope leaks the storage it points to.
7872 return NULL;
7873 }
7874 }
7875 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result),
SWIGTYPE_p_qpid__messaging__Message, SWIG_POINTER_NEW | 0 );
7876 {
________________________________________________________________________
CID 1063261: Logically dead code (DEADCODE)
/bindings/qpid/perl/perlPERL_wrap.cxx: 5066 ( assignment)
5063 dXSARGS;
5064
5065 {
>>> Assigning: "_index" = "0UL".
5066 unsigned long _index = 0;
5067 SWIG_TypeRank _rank = 0;
5068 if (items == 1) {
5069 SWIG_TypeRank _ranki = 0;
5070 SWIG_TypeRank _rankm = 0;
/bindings/qpid/perl/perlPERL_wrap.cxx: 5082 ( const)
5079 _ranki += _v*_pi;
5080 _rankm += _pi;
5081 _pi *= SWIG_MAXCASTRANK;
>>> At condition "_index", the value of "_index" must be equal to 0.
5082 if (!_index || (_ranki < _rank)) {
5083 _rank = _ranki; _index = 1;
5084 if (_rank == _rankm) goto dispatch;
5085 }
5086 }
/bindings/qpid/perl/perlPERL_wrap.cxx: 5082 ( dead_error_condition)
5079 _ranki += _v*_pi;
5080 _rankm += _pi;
5081 _pi *= SWIG_MAXCASTRANK;
>>> The condition "!_index" must be true.
5082 if (!_index || (_ranki < _rank)) {
5083 _rank = _ranki; _index = 1;
5084 if (_rank == _rankm) goto dispatch;
5085 }
5086 }
/bindings/qpid/perl/perlPERL_wrap.cxx: 5082 ( dead_error_line)
5079 _ranki += _v*_pi;
5080 _rankm += _pi;
5081 _pi *= SWIG_MAXCASTRANK;
>>> CID 1063261: Logically dead code (DEADCODE)
>>> Execution cannot reach this expression "_ranki < _rank" inside statement
>>> "if (!_index || _ranki < _ra...".
5082 if (!_index || (_ranki < _rank)) {
5083 _rank = _ranki; _index = 1;
5084 if (_rank == _rankm) goto dispatch;
5085 }
5086 }
________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com
To unsubscribe from the email notification for new defects,
http://scan5.coverity.com/cgi-bin/unsubscribe.py
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]