QuickLinks -- Click here to rapidly navigate through this document
Exhibit 5.1
Valero L.P.
One Valero Way
San Antonio, Texas 78249
(210) 345-2000
Bradley C. Barron
Managing Counsel, Corporate Law
November 23, 2004
Valero L.P.
One Valero Way
San Antonio, Texas 78249
- Re:
- Merger of wholly owned subsidiary of Valero L.P. with and into Kaneb Pipe Line
Partners, L.P.
Ladies and Gentlemen:
I have acted as counsel to Valero L.P., a Delaware limited partnership, in connection with the partnership actions taken and to be taken relating to the merger (the "Merger") of a wholly owned subsidiary of Valero L.P. with and into Kaneb Pipe Line Partners, L.P., a Delaware limited partnership ("Kaneb Partners"), with Kaneb Partners being the surviving entity, and the conversion of each of the common units of Kaneb Partners issued and outstanding at the effective time of the Merger into a certain number of common units of Valero L.P., with such number to be determined at or immediately prior to the effective time of the Merger in accordance with the Agreement and Plan of Merger dated as of October 31, 2004 by and among Valero L.P., Riverwalk Logistics, L.P., Valero GP LLC, VLI Sub B LLC, Kaneb Partners and Kaneb Pipe Line Company LLC (the "Merger Agreement"). I have also participated in the preparation and filing with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Securities Act"), of a registration statement on Form S-4, dated as of November 23, 2004 (the "Registration Statement"), relating to the Merger and the issuance of common units of Valero L.P. (the "Valero L.P. Common Units") in connection therewith.
This opinion is being delivered in accordance with the requirements of Item 601(b)(5) of Regulation S-K under the Securities Act. In connection with rendering this opinion, I have examined such documents and records of Valero L.P. and such other statutes, regulations, records, instruments, certificates and documents as I have deemed necessary or advisable for the purposes of this opinion. In my examination, I have assumed the genuineness of all signatures, the legal capacity of natural persons, the authenticity, accuracy and completeness of all documents submitted to me as originals, the conformity to original documents of all documents submitted to me as certified, conformed or photostatic copies and the authenticity, accuracy and completeness of the originals of such copies. As to any facts material to the opinion expressed herein which I have not independently established or verified, I have relied upon statements and representations of officers and representatives of Valero L.P., public officials and others.
2
Based on the foregoing, it is my opinion that the Valero L.P. common units have been duly and validly authorized by all necessary action on the part of Valero L.P., and when issued pursuant to the terms of the Merger Agreement, will be validly issued, fully paid (to the extent required under Valero L.P.'s agreement of limited partnership) and non-assessable, except as such nonassessability may be affected by Section 17-607 of the Delaware Revised Uniform Limited Partnership Act.
I am admitted to the Bar of the State of Texas. I express no opinion other than as to the federal laws of the United States of America and the Delaware Revised Uniform Limited Partnership Act. I hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to my name under the heading "Legal Matters" in the Registration Statement. In giving this consent, I do not admit that I am an "expert" under the Securities Act, or the rules and regulations of the Commission issued thereunder, with respect to any part of the Registration Statement, including this exhibit.
| Very truly yours, |
| /s/ BRADLEY C. BARRON | | |
3
QuickLinks
Valero L.P. One Valero Way San Antonio, Texas 78249 (210) 345-2000November 23, 2004