r23798: updated old Temple Place FSF addresses to new URL
[kai/samba.git] / source3 / lib / ldb / tools / cmdline.c
index 928519f3bbd6c43feb95c2e6bf7fbabba584438b..4744ab4989696aaad76c8b602dfa392b8ab44019 100644 (file)
@@ -10,7 +10,7 @@
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
+   version 3 of the License, or (at your option) any later version.
 
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,8 +18,7 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with this library; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -269,10 +268,17 @@ struct ldb_control **parse_controls(void *mem_ctx, char **control_strings)
                                fprintf(stderr, "   note: b = boolean, n = number, s = string, o = b64 binary blob\n");
                                return NULL;
                        }
-                       ctrl[i] = talloc(ctrl, struct ldb_control);
+                       if (!(ctrl[i] = talloc(ctrl, struct ldb_control))) {
+                               fprintf(stderr, "talloc failed\n");
+                               return NULL;
+                       }
                        ctrl[i]->oid = LDB_CONTROL_VLV_REQ_OID;
                        ctrl[i]->critical = crit;
-                       control = talloc(ctrl[i], struct ldb_vlv_req_control);
+                       if (!(control = talloc(ctrl[i],
+                                              struct ldb_vlv_req_control))) {
+                               fprintf(stderr, "talloc failed\n");
+                               return NULL;
+                       }
                        control->beforeCount = bc;
                        control->afterCount = ac;
                        if (attr[0]) {