#26 Check return codes everywhere

open-later
Ludwig Nussel
None
5
2005-08-20
2005-08-19
Markus Elfring
No

Some checks for return codes are missing.

Example:
Please add more error handling for null pointers from
"malloc" like in the functions "dns_queue_add" and
"fork_worker".
http://cvs.sourceforge.net/viewcvs.py/xqf/xqf/src/dns.c?rev=1.8&view=markup

Discussion

  • Ludwig Nussel
    Ludwig Nussel
    2005-08-20

    Logged In: YES
    user_id=333900

    the malloc could be replaced by glib functions which already
    do some kind of exception handling. However, since xqf can't
    cope with OOM anyways there is no point in checking for
    NULL. Whether it segfaults due to null deref or exits with some
    code is only cosmetic here.

     
  • Ludwig Nussel
    Ludwig Nussel
    2005-08-20

    • status: open --> closed-wont-fix
     
  • Markus Elfring
    Markus Elfring
    2005-08-20

    • assigned_to: nobody --> l-n
    • status: closed-wont-fix --> open-later
     
  • Markus Elfring
    Markus Elfring
    2005-08-20

    Logged In: YES
    user_id=572001

    Please use the safe functions that are described on the page
    "http://developer.gnome.org/doc/API/2.0/glib/glib-Memory-Allocation.html".
    Segmentation faults are not "cosmetic" errors.