Fixed memory leak in addDecl() and addProc() function.