
    Federick A. Brown, Appellant, v Samalin & Bock, P. C., et al., Respondents.
   — In an action to recover damages for legal malpractice, the plaintiff appeals from (1) an order of the Supreme Court, Westchester County (Ruskin, J.), entered September 12, 1988, which denied his motion for leave to serve an amended complaint, and (2) an order of the same court, entered December 7, 1988, which denied his second motion for leave to serve an amended complaint.

Ordered that the orders are affirmed, with costs.

While leave to amend should be freely given (CPLR 3025 [b]), the decision of whether to do so is committed to the discretion of the trial court and its exercise of that discretion will not be lightly set aside. A proposed amendment which is devoid of merit should not be permitted, thereby obviating needless, time-consuming litigation (see, Goldstein v Barco of Cal., 109 AD2d 817; Fiesel v Nanuet Props. Corp., 125 AD2d 292).

The plaintiff sought to add to his legal malpractice claim, inter alla, causes of action based upon the deceitful procurement of a release by the attorney defendants, so as to entitle him to punitive damages. We agree that the release and its assertion as an affirmative defense to the malpractice claim are separate and unrelated to the malpractice claim itself. However, even if the procurement of the release constituted a violation of the Code of Professional Responsibility, as plaintiff claims, it did not, in itself, generate a separate cause of action which might support an award for punitive damages (see, Brainard v Brown, 91 AD2d 287). Finally, Judiciary Law § 487 is inapplicable to the case at bar, since the defendants’ allegedly deceitful conduct in obtaining the release was not the cause of the plaintiff’s damages (see, Di Prima v Di Prima, 111 AD2d 901). Kunzeman, J. P., Rubin, Harwood and Balletta, JJ., concur.  